Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2944 closed defect (fixed)

slideIn()/slideOut don't work for aborted operations

Reported by: bill Owned by: Bryan Forbes
Priority: high Milestone: 0.9beta
Component: lfx Version: 0.9
Keywords: 4dijit Cc: alex, Adam Peller, bill
Blocked By: Blocking:

Description

Basically, the code that I added to wipeIn/wipeOut, which Alex ported to dojo 0.9, to handle nodes with fixed height setting (like node.style.height="300px") is doing more harm than good. Specifically it messes up when (for example) you halfway open a title pane and then abort and start to close it.

So I'd like to just support natural height divs. If you want a fixed height div, just do something like:

<div>
   <div style="height: 300px">...</div>
</div>

The contract for the functions will be:

  1. slideIn() (like fadeIn()) will expand the node from it's current height to it's full natural height
  2. if the node is display:none then before the animation starts it will set it to height:1px, display:""
  3. slideOut() (like fadeOut()) will collapse the node from it's current height to 0 height, and then make the node display:none (and height:auto)
  4. play()'s signature is: play: function(/*int?*/ delay, /*boolean?*/ gotoStart). If you set gotoStart to true then the height will be set to 0 (for slideIn()) or auto (for slideOut()) before the animation starts.

Change History (4)

comment:1 Changed 12 years ago by alex

Cc: alex Adam Peller bill added
Owner: changed from bill to Bryan Forbes

changes seem fine

comment:2 Changed 12 years ago by bill

Keywords: 4dijit added

I hope my suggestion above works... I'm worried about how to deal w/the width of the title pane. Needs some testing/thinking.

comment:3 Changed 12 years ago by dante

Resolution: duplicate
Status: newclosed

marking as duplicate refs #2343

comment:4 Changed 12 years ago by bill

Resolution: fixed

(In [9498]) Make slideIn()/slideOut() assume a natural height for the node, rather than trying to obey a height specification on the node's style. This simplification fixes #2944, #2343, #3152

Note: See TracTickets for help on using tickets.