Approved!

Philip Romanik wrote:
Change 20070201-Philip-2 by [EMAIL PROTECTED] on 2007-02-01 19:29:27 EST
    in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/legals

Summary: Fix clipping rectangle when non-integer values for width/height used

New Features:

Bugs Fixed: LPP-3299

Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
I found that non-integer width/height values are possible and this was causing t he clipping rectangle in LzSprite.js to pass a rect that had non-integer values. I only found this to be an issue with dhtml FF 1.5 and 2.0 (it's fine on IE6/7 and swf). The fix is to use Math.floor() on the width/height when computing the rect. LzSprite.js uses Math.floor() in many places (see LzSprite.CSSDimension).


Tests:

The top tab example on this page now looks fine on FF 1.5/2 in dhtml:

http://localhost:8080/legals/examples/components/tabs_example.lzx?lzr=dhtml

This example is consistent in swf and dhtml. I tested on FF 1.5/2.0 and IE 6/7 on the PC

<canvas>
<simplelayout spacing="10"/>

<tabs x="10" height="111.5" width="200">
<tabpane>Tab 1<text>Height = 111.5</text></tabpane>
</tabs>

<tabs x="10" height="111" width="200.5">
<tabpane>Tab 2<text>Width = 200.5</text></tabpane>
</tabs>

<tabs x="10" width="101" height="101">
<tabpane>Tab 3<text>Integer values</text></tabpane>
</tabs>

</canvas>


Files:
M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070201-Philip-2.tar



--
Regards,
Max Carlson
OpenLaszlo.org

Reply via email to