|
|
|
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. $ 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 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. 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. Confirmed problem is fixed in Build-lps-3.3-001872/lps-3.3/
openlaszlo-3.3.1-windows-dev-install.exe. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.