I don't think such a method should be in the main code, maybe put it in an
extension file with more of these easy-to-use methods. Things like centering
layers on the screen could also be included in that extension.
Adding stuff like this to the core files would make them bigger then most
people need.
Pascal Bestebroer ([EMAIL PROTECTED])
Software ontwikkelaar
Oberon Informatiesystemen b.v.
http://www.oibv.com
> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]Namens Michael
> Pemberton
> Verzonden: woensdag 7 februari 2001 2:58
> Aan: [EMAIL PROTECTED]
> Onderwerp: [Dynapi-Dev] Added methods for DynDocument and DynLayer
>
>
> I find that many widgets and functions (eg dargging) use
> layer.x+layer.w
> to calculate the edge of the layer. I suggest that there be two new
> methods added to the layer and coument objects that calculate this for
> you.
>
> Here's the code:
>
> DynLayer.prototype.getX2=function() { return
> this.x+this.getWidth(); };
> DynLayer.prototype.getY2=function() { return
> this.y+this.getHeight(); };
>
> DynLayer.prototype.getPageX2=function() { return
> this.getPageX()+this.getWidth(); };
> DynLayer.prototype.getPageY2=function() { return
> this.getPageY()+this.getHeight(); };
>
> DynDocument.prototype.getX2=DynDocument.prototype.getX2;
> DynDocument.prototype.getY2=DynDocument.prototype.getY2;
>
> --
> Michael Pemberton
> [EMAIL PROTECTED]
> ICQ: 12107010
>
>
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev