Hi,
> Do we have to still use the <layer> tags?
I'm not sure, but I think the fact we use layer tags for NS4 is the main
reason why NS4 is reasonably stable using DynAPI2.
If you have ever tried to debug a Dreamweaver page to work with NS4, you'll
know about the crazy bugs NS4 comes up with when using DIV's with CSS
applied.

>I don't think there is a way to set it in the <layer> tag wether
> the background image is repeating or not, it is just by default
> repeating.

I put up a test here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/dynapi/dynapi/test
s/background_image.html

It seems to me NS4 will work with no-repeat, but only when you apply


background-image:url("http://developer.netscape.com:80/docs/manuals/communic
ator/dynhtml/bluelite.gif");

not with


layer-background-image:url("http://developer.netscape.com:80/docs/manuals/co
mmunicator/dynhtml/bluelite.gif");

(Both applied as CSS to a DIV and a LAYER.)
Very strange, I didn't even knew background-image worked in NS4 I always
used both tags to cover all browsers.

The basic idea behind your code seems ok to me, but remember, the way you
set it up, the bgImageRepeat variable must be set before the dynLayer is
created, and wont work with dynLayer.setBgImage(...).
I guess we need true or false passed as second parameter of setBgImage too.

Also, as of IE6, we can't use background images on layers that are to be
animated, or they reload from the server constantly. This seems to be much
more serious than IE5.5's ghost hourglass problem.
It might even warrant setting an alert in pathanim (or wherever) to check if
a layer has a background image, and warning the developer that that layer
can't be animated.
This issue could do with some more testing though - does it always happen,
even if the background-image layer is nested inside another one, etc...

> Should I just make the changes, test them, and put them right into the
> cvs?

Personally I would set up a testpage (in /tests) , showing how the changes
would work in practice, and put your changed methods in first thing after
DynAPI.onload, that way they will overwrite the existing methods, and you
can test your new code on the CVS version, without changing everything
immediately.

Cheers,
Richard.




----- Original Message -----
From: "Matt Fair" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 10, 2001 6:51 PM
Subject: [Dynapi-Dev] dynlayer.js bgImage bgImageRepeat


> Do we have to still use the <layer> tags?  I have been researching how
> to set the background image of the layer and either have it repeat or
> not.  I don't think there is a way to set it in the <layer> tag wether
> the background image is repeating or not, it is just by default
> repeating.  So I am thinking of this:
> -have a variable this.bgImageRepeat=false by default
> -for getOuterHTML() :
> if (is.def) {
>   DynLayer.prototype.getOuterHTML=function() {
> ...
>     if (this.bgImage!=null) {
>       s+=' background-image:url('+this.bgImage+');';
>       if (this.bgImageRepeat) s+=' background-repeat:repeat;';
>       else s+=' background-repeat:no-repeat;';
>     }
>   ...
>   };
> }else if (is.ns4) {
>   DynLayer.prototype.getOuterHTML=function() {
>     var s='\n<layer id="'+this.id+'"';
> ...
>
>     if (this.bgImage!=null && this.bgImageRepeat)
> s+=' background="'+this.bgImage+'"';
>
> ...
>    s+='>';
>    if(this.bgImage!=null && !this.bgImageRepeat)
> s+='<img src="'+this.bgImage+'">';
>        if (this.html!=null) s+=this.html;
>     for (var i=0; i<this.children.length; i++)
> s+=this.children[i].getOuterHTML();
>     s+='</layer>';
>     return s;
>   };
> };
>
>
> What does anyone think?
> Should I just make the changes, test them, and put them right into the
> cvs?
>
> Matt
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://www.mail-archive.com/dynapi-dev@lists.sourceforge.net/
>


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/dynapi-dev@lists.sourceforge.net/

Reply via email to