← Back to team overview

yellow team mailing list archive

[Bug 728457] Re: effects slide_in/out sometimes break resizing

 

Updated metadata per https://dev.launchpad.net/BugTriage#How to triage

** Changed in: lazr-js
   Importance: Undecided => High

** Changed in: lazr-js
       Status: Confirmed => Triaged

-- 
You received this bug notification because you are a member of Launchpad
Yellow Squad, which is a bug assignee.
https://bugs.launchpad.net/bugs/728457

Title:
  effects slide_in/out sometimes break resizing

Status in LAZR Javascript Library:
  Triaged

Bug description:
  After using slide_in the height of the node is set to 0.  Subsequently
  using slide_in the scrollHeight must be obtained.  In some situations
  the node incorrectly reports a scrollHeight of 0 and thus cannot open
  properly.

  A solution was suggested by Thomas Herve in 
  http://paste.ubuntu.com/574976/

  The following needs to be added to incorporated into
  add_slide_state_events:

  For slide_in:

      anim.on("start", function() {
          node.setStyles({
              visibility: 'visible'
          });
      });
      anim.on("end", function() {
          node.setStyles({
              height: 0,
              visibility: 'hidden'
          });
      });

  For slide_out:

      anim.on("start", function() {
          // Set the node to 'visible' for the beginning of the animation.
          node.setStyles({
              visibility: 'visible'
          });
      });
      anim.on("end", function() {
          // Change the height to auto when the animation completes.
          node.setStyles({
              height: 'auto'
          });
      });