Opened 15 years ago

Closed 14 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 bill)

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 if more details needed

Change History (7)

comment:1 Changed 15 years ago by bill

Milestone: 0.5
Owner: changed from Bryan Forbes to bill

Yeah, you need to attach a testcase to the bug report. I don't know what your onClick handler does exactly.

comment:2 Changed 15 years ago by guest

<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
<script type="text/javascript">
toggled = new Array();
function toggle(input_id){
dojo.lfx.html.wipeOut(input_id, 300).play();
dojo.lfx.html.wipeIn(input_id, 300).play();

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();

this works fine unless i start clicking fast then the effect gets broken

comment:3 Changed 15 years ago by bill

Description: modified (diff)

OK, so

comment:4 Changed 15 years ago by guest

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:5 Changed 15 years ago by guest

any eta on this fixed ? ;-)

comment:6 Changed 15 years ago by Adam Peller

Owner: changed from bill to Bryan Forbes

comment:7 Changed 14 years ago by bill

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.