Still more research...

It appears that reverselayout works fine as long as it's not the root layout
in a dialog.

If you use reverselayout in a plain view in your canvas, it behaves
correctly.

I think the problem is the thickness of the border on modaldialog is taken
into account in the code from the update method I singled out below.

I'm not sure how to properly fix this.




-----Original Message-----
From: William Krick [mailto:[EMAIL PROTECTED]
Sent: Monday, January 23, 2006 6:44 PM
To: Jim Grandy
Cc: [email protected]
Subject: RE: [Laszlo-user] bug in reverselayout -- possible fix


I've looked into this a little bit more.

In the update method of reverselayout, there's this bit of code
in the middle...


    if (total < this.parent[ this.sizeAxis ]) {
        total = this.parent[ this.sizeAxis ];
    }


...I'm not sure what the code is supposed to do but when I
remove it, reverselayout seems to work properly.

Can you run this fix by whoever wrote the original layout?

...
Krick




-----Original Message-----
From: Jim Grandy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 18, 2006 5:39 PM
To: William Krick
Cc: [email protected]
Subject: Re: [Laszlo-user] bug in reverselayout


I agree, there is a bug here. Filed as

http://www.openlaszlo.org/jira/browse/LPP-1385

jim

On Jan 17, 2006, at 11:48 AM, William Krick wrote:

> The sample code below displays two dialog boxes.
>
> The first box uses simplelayout with a 'y' axis.
>
> The second box uses reverselayout with a 'y' axis.
>
> Notice that the size of box using reverselayout is larger and the
> close
> button is off the screen.  You can get focus on the button by
> hitting the
> tab key, then hit enter to close the box.
>
> I would expect both boxes to be the same size with just the inner
> view order
> reversed.
>
> I think there's a bug here somewhere.
>
>
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <canvas width="600" height="400">
>
>   <modaldialog name="d1">
>     <simplelayout axis="y" spacing="2"/>
>     <text>simplelayout</text>
>     <button text="close" onclick="parent.close()"/>
>   </modaldialog>
>
>   <modaldialog name="d2">
>     <reverselayout axis="y" spacing="2"/>
>     <text>reverselayout</text>
>     <button text="close" onclick="parent.close()"/>
>   </modaldialog>
>
>   <simplelayout axis="y"/>
>   <button text="simplelayout" onclick="canvas.d1.open()"/>
>   <button text="reverselayout" onclick="canvas.d2.open()"/>
>
> </canvas>
>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user



_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user


_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to