History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-2172
Type: Bug Bug
Status: Verified Verified
Resolution: Fixed
Priority: P1 P1
Assignee: Frisco Del Rosario
Reporter: sanjaya lai
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

wrappinglayout update() method doesn't skip invisible subviews

Created: 12/Jun/06 02:25 PM   Updated: 26/Oct/06 02:46 PM
Component/s: Components - all
Affects Version/s: None
Fix Version/s: 3.4, 3.3.3

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 1,322
Runtime: N/A
Flags: Support
Fix in hand: True


 Description  « Hide
The update() method in wrappinglayout class does not skip invisible subviews.
This behaves differently with the update() method in simplelayout class.

If this is confirmed as a bug, the following extra check may be used to fix this bug:

BEFORE:
   <method name="update">
        <![CDATA[
 .....
        for(var i=0; i < l; i++) {
            var s = this.subviews[i];
            s.animate(this.axis, pos, this.duration,false);
....

AFTER:
...
        for(var i=0; i < l; i++) {
            var s = this.subviews[i];
            if ( !s.visible ) continue; //add visibility check before procesing a subview
            s.animate(this.axis, pos, this.duration,false);
.....


thank you.
Sanjaya

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Amy Muntz - 21/Jun/06 10:49 AM
Phil - please code review fix and check into trunk.

Philip Romanik - 11/Jul/06 08:01 AM
This problem exists in these layouts:
  constantboundslayout
  wrappinglayout
  resizelayout
  simpleboundslayout
  stableborderlayout

The solution has an additional step than outlined in the problem description. A call to update() is necessary when the visibility of a view is changed. LzLayout.updateDelegate will be used to handle this automatically.


Philip Romanik - 13/Jul/06 01:17 PM
Fixed layouts that didn't work when subviews were made invisible; resizelayout, wrappinglayout, simpleboundslayout.

A test file to demonstrate the issue can be found in /test/bugs/bug-2172.lzx