Opened 13 years ago
Closed 12 years ago
#1776 closed defect (fixed)
dojo.lfx.wipeOut and dojo.lfx.wipeIn breaks on doubleclick
Reported by: | guest | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | lfx | Version: | 0.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
If wipeIn() is called when wipeOut() animation is in progress, or vice-versa, then the node ends up in a half open state.
contact me at admin_AT_darknation.pl if more details needed
Change History (7)
comment:1 Changed 13 years ago by
Milestone: | → 0.5 |
---|---|
Owner: | changed from Bryan Forbes to bill |
comment:2 Changed 13 years ago by
<div id="menu_statistics" class="menu_item" onclick="toggle('menu_statistics_subitems')">Statystyki</div> <div id="menu_statistics_subitems" class="menu_subitems"> a b c </div> </div> <script type="text/javascript"> <!-- toggled = new Array(); function toggle(input_id){ if(toggled[input_id]==true){ dojo.lfx.html.wipeOut(input_id, 300).play(); toggled[input_id]=false; }else{ dojo.lfx.html.wipeIn(input_id, 300).play(); toggled[input_id]=true; } } dojo.lfx.html.wipeOut('menu_user_management_subitems', 1).play(); dojo.lfx.html.wipeOut('menu_content_management_subitems', 1).play(); dojo.lfx.html.wipeOut('menu_statistics_subitems', 1).play(); //--> </script>
this works fine unless i start clicking fast then the effect gets broken
comment:4 Changed 13 years ago by
OK, so I saw it too today. Looks like a race condition where wipeIn() grabs the current size of the element when it is fired, storing them in "oprop". If the sizes grabbed when the animation starts are some intermediate size (as it would be if a previous animation was in the middle of playing), then that's the size that will be set on the element after the second animation is complete -- the wrong size, something smaller than the original.
The animation handlers for the wipe* functions should most likely set a flag to indicate when an animation is in progress, and to either capture the *original* values to use for the second, or somehow terminate and complete the first animation (thereby resetting the orignal values) before starting the second.
comment:6 Changed 13 years ago by
Owner: | changed from bill to Bryan Forbes |
---|
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Yes, you need to stop the wipeOut animation before you start the wipeIn() (or vice-versa). See play() and stop() functions. Also, there were some issues in 0.4 but they are fixed in 0.9.
Yeah, you need to attach a testcase to the bug report. I don't know what your onClick handler does exactly.