|
From: Bill W. <bil...@us...> - 2000-12-04 19:29:53
|
Perhaps, (and I am not sure) it is because this.css.width is only for ie and
ns5 and you might be using netscape 4.7????
I found this in DynLayer's setSize method. Otherwise it sets the clip width
and height.
if (is.ie || is.ns5) {
this.css.width=w
this.css.height=h
}
For cross browser compatability use the '.getWidth()' method or, the '.w'
property (not .css.width)
But this.w accesses the width directly, which is really a no-no in OO.
getWidth() is better, because someone may change the '.w' property to
'.widthofmyfunkylayerthingamajig' someday. If you use this.getWidth() it
should still work even then, assuming they did it right.
Regards
-bw
Álvaro Peña González <ice...@ve...> wrote:
> ---------------------------------------------
> Attachment:
> MIME Type: multipart/alternative
> ---------------------------------------------
> Ok Bill.
>
> The code works correctly with your change.
>
> But I ask a thing:
>
> Because the message that I place after storing wide and high of the layer
and the document shows the data of lw, lh, dw and dh correctly and later do
not make the operations correctament?
>
> lw = this.css.width;
> lh = this.css.height;
> dw = DynAPI.document.w;
> dh = DynAPI.document.h;
>
> alert("Function Aling() lw:"+lw+" lh:"+lh+" dw:"+dw+" dh:"+dh+"
cHor:"+cHor+" cVer:"+cVer); < It gives the correct values of wide and the high
of layer and document.
>
> Some explanation?
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
|