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

Key: LPP-2091
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: -- --
Assignee: Mamye Kratt
Reporter: Younes AZZAM
Votes: 1
Watchers: 1
Operations

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

simplelayout axis=y on a view cancels the align=center of sub views on 3.3

Created: 24/May/06 05:24 AM   Updated: 26/Jun/06 09:38 PM
Component/s: Components - all
Affects Version/s: 3.3
Fix Version/s: 3.3.1

Time Tracking:
Not Specified

File Attachments: 1. File simplelayout_xwithydefined.lzx (0.3 kb)
2. File simplelayout_ywithxdefined.lzx (0.3 kb)
3. File test_lpp2091.lzx (0.3 kb)

Environment: windows XP proffesional

Severity: Blocker
Fixed in Change#: 42,598
Runtime: N/A
Fix in hand: False


 Description  « Hide
Hi
when i try this

<canvas height="50" width="500">
  <view width="50" height="50" bgcolor="red">
    <view name="v1" width="30" height="30" bgcolor="blue" align="center"/>
    <view name="v2" width="30" height="30" bgcolor="green" align="right"/>
    <simplelayout axis="y"/>
  </view>
</canvas>

the result is the two subview's v1 and v2 align become left, ignoring the align center or right

this bug was not present on openlaszlo 3.2

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Luca Ritossa - 25/May/06 04:09 AM
I confirm this bug.

Another example is:

<canvas>
    <view y="10" bgcolor="red" width="500" height="100">
        <simplelayout axis="y"/>
        <text align="center" >This text should be centered inside the red view</text>
        <text align="center" >This text too</text>
        <text align="right" >This text should be right aligned</text>
    </view>
</canvas>

In OpenLaszlo 3.2 this code works fine.

Luca R.

Bruce Cummins - 30/May/06 02:41 PM
Problem was in update. s.setAttribute was always setting value to 0.

Added condition to determine correct value to use, and modified setAttribute to use that value.

Bruce Cummins - 30/May/06 03:18 PM
$ diff old_simplelayout.lzx simplelayout.lzx
54a55
> var f
56c57,61
< s.setAttribute( o , 0 ); // reset opposite axis
---
>
> if (o=="y") {f=s.y;}
> else {f=s.x;}
>
> s.setAttribute( o , f); // reset opposite axis

Mamye Kratt - 05/Jun/06 02:42 PM
The test file test_lpp2091.lzx is not centering the text in the red box as it says it should.
 -simplelayout_xwithydefined.lzx, gives me 3 blue boxes aligned horizontally.
 -simplelayout_ywithxdefined.lzx, gives me 3 blue boxes aligned vertically.
 -test_lpp2091, gives me a red box with all the text aligned to the left.

Philip Romanik - 05/Jun/06 04:47 PM
Hi Mamye,

I ran the filetest_lpp2091.lzx on my installation of lps-3.3 and I see the
desired behavior. As a check I synced with perforce and rebuilt the code.

Are you running using the sources from perforce or subversion? If I try the
example at openlaszlo.org, everything is left aligned. I don't think that
is running the latest code though.

Mamye Kratt - 05/Jun/06 05:42 PM
Confirmed problem is fixed in Build-lps-3.3-001872/lps-3.3/
openlaszlo-3.3.1-windows-dev-install.exe.