Re: [cssom-view] DOMRect with aliases x, y to left, top?

On Sep 27, 2013, at 12:15 PM, James Ross <> wrote:

> > Date: Fri, 27 Sep 2013 10:18:44 +0200
> > From:
> > Subject: Re: [cssom-view] DOMRect with aliases x, y to left, top?
> > 
> > I guess there's a fourth option:
> > 
> > (d) Make top/right/bottom/left readonly and only allow mutating 
> > x/y/width/height.
> For what it's worth, this is what some non-web platforms have done, e.g. .NET's Rectangle and Java's RectangularShape.

Most of them don't have left, top, bottom, right either. It is more minX, minY, maxX and maxY.

As you say, they can mostly not be set.

I still wonder if we let 'left' mutable, should it be possible that it will reflect the right side of a rect? Or should we rather switch the values between 'left' and 'right' if that happens? I think that is related to Robert's question if 'width' and 'height' should ever be negative.


> -- 
> James Ross <>

Received on Friday, 27 September 2013 10:27:49 UTC