From: Scott A. L. <sc...@sc...> - 2000-10-31 23:16:23
|
Maybe clipping functions could be separated into a DynLayer extension, rather than being part of the core. Clipping is still useful for wipe effects, but if there's really no reason to set clip manually then maybe the setSize can be rewritten to set clip values for NS initially. Pascal Bestebroer wrote: > > Sorry for mailing so much into this list :-) > > but just looked at the setClip() some more and as I see it the clip() is > always the > same as the top;left;width and height values? then why use it? Only > Netscape needs > the values set, so for IE we could totally skip the setClip() method. > > IF the setClip() can be used in IE to set some other sort of clipping on/off > (not sure > what) then we could make another function that is called for setSize() > methods (setWidth,setHeight) > which does NOT call the old setclip, but a simple call for Netscape (making > sure bottom,right,left and top > values are set correctly). > > This seems to speed up things ALOT, here's another hack at the function: > > DynLayer.prototype.setClip=function(clip) { > if (!this.created || is.ie || is.ns5) return > var c=this.css.clip > c.top=clip[0]||0 > c.right=clip[1]||this.w > c.bottom=clip[2]||this.h > c.left=clip[3]||0 > } > > For a function that is, in my opinion, rarely used it takes up way to much > initialisation time.. > > with the above code I got a speed increase of 50% on 300 simple dynlayers > (in a for-loop) that's > on a P3 600, so not sure what other machines would do, and/or if IE4 behaves > nicely with this code. > > Pascal Bestebroer > pa...@dy... > http://www.dynamic-core.net > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |