On 26-Jan-07, at 12:24 AM, Arnar Birgisson wrote:
> Ok, sounds good. Is there any way in js to enforce things like
> b-t=h and r-l=w
>
> I.e. if the user changes any of these attributes, the others would
> need to be updated to.
>
> I was actually thinking more in the line of a generic two-dimensional
> vector prototype with attrs {x, y}.
>
> I think the Box idea is good though, but maybe Box should be {t,r,b,l}
> and have methods like getWidth, getHeight and getSize (which would
> return an instance of the vector thing)?
We can do the b-t = h calculations in the getSize method. So a
{t,r,b,l} Box with a couple useful prototypes.
Do Coordinates and Dimensions and Box belong in Base? Or is Style OK?
And why don't we update the names, so Coordinates => Point, and
Dimensions => Size?
Thanks,
Beau
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---