If you round it up the error still remains. Doing a floor() is
consistent with what LzSprite.CSSDimension() does.
Phil
Perhaps we should use Math.round() instead of Math.floor() so we get
the extra pixel?
Also, it seems like we should be catching this earlier, during
setWidth/Height...
-Max
Philip Romanik wrote:
[Hide Quoted Text]
Hi Max,
I forgot to send the change I'm trying out:
LzSprite.prototype.__updateClip = function() {
...
this.__LZdiv.style.clip = 'rect(0px ' + Math.floor(this.width)
+ 'px ' + Math.floor(this.height) + 'px 0px)';
...
}
Phil
On 2/1/07, Philip Romanik <[EMAIL PROTECTED]> wrote:
Hi Max,
I'm tracking down the problem of tabs with missing borders in dhtml FF
1.5 and 2.0. It looks like it is caused by non-integer values for the
width and/or height of the view. I didn't see any other controls with
this problem but it sounds like a generic issue. The clipping
rectangle built by LzSprite.js has non-integer values.
This isn't a problem in swf or IE.
This is a simple example to demonstrate:
<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>
Any thoughts?
Thanks!
Phil
--
Regards,
Max Carlson
OpenLaszlo.org