heispsychotic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-26 20:59 UTC
Core Effects beforeStart Issue
There appears to be an issue with the Core Effects beforeStart callback. If data is written to the object that is being rolled down on the beforeStart callback the scrolling effect fails to happen. The div will be displayed but not until the effect finishes. Anyone found a workaround to this issue? The following code will demonstrate the issue: <div id="searchResults" style="display: none;"></div> <script> new Effect.BlindDown($("searchResults"), { beforeStart: function() { $ ("searchResults").update("test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>"); }, afterFinish: function() { //alert("done"); } }); </script> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
heispsychotic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-26 21:51 UTC
Re: Core Effects beforeStart Issue
Adding this after the element.update() seems to work. //Stolen directly from the effects.js class. var elementDimensions = $("searchResults").getDimensions(); e.options.scaleMode.originalHeight = elementDimensions.height; e.options.scaleMode.originalWidth = elementDimensions.width; On Mar 26, 1:59 pm, "heispsycho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <heispsycho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> There appears to be an issue with the Core Effects beforeStart > callback. If data is written to the object that is being rolled down > on the beforeStart callback the scrolling effect fails to happen. The > div will be displayed but not until the effect finishes. Anyone found > a workaround to this issue? > > The following code will demonstrate the issue: > > <div id="searchResults" style="display: none;"></div> > <script> > new Effect.BlindDown($("searchResults"), { > beforeStart: function() { > $ > ("searchResults").update("test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>test<br>"); > }, > afterFinish: function() { > //alert("done"); > }}); > > </script>--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Since your effect does not use queueing, and will therefore trigger immediately (well, within 1/60th of a second), I fail to understand why on Earth you don''t do your update *before* creating the effect... That would be so much simpler... -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---