Peepz,

I was looking into how script.aculo.us handles effect to write a tutorial and for a current project I wanted to make transition between PAIR effects possible. These PAIR effects are (Appear/Fade, SlideUp/SlideDown, BlindUp/BlindDown) the effect that toggle can handle.

script.aculo.us calls queue.loop each 40 milliseconds, and that calls all the effect.loop for all effects in the queue. Then Effect calls render and calls setup when its idle and calls update (with position) when its running. *update* does what the effects should do (fade, scale or move) and its called with the pos parameter 25 times a second. So know we have a problem, how does one calculate if a effect in the same queue with the same dom its trying to activate itself during the previous effect on the same dom.

I think there are 2 things we can do:
- Search the queue each time render is called for a effect and cancel the queue if the effect is manipulating the same dom and its PAIR effect of a other. I think this would kill the performance unless the transition only happens when a option is specified. - The second think what could be done is, passing on the effect that is created to make the transition against. This would be much more easy however it would talk more effect to use it.

What do you guys think? anyone have a other opinion?

Thnx,

Abdur-Rahman

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to