W3C home > Mailing lists > Public > www-style@w3.org > September 2013

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

From: Dirk Schulze <dschulze@adobe.com>
Date: Fri, 27 Sep 2013 03:27:09 -0700
To: James Ross <w3c-20040125@james-ross.co.uk>
CC: Simon Pieters <simonp@opera.com>, www-style list <www-style@w3.org>
Message-ID: <042E2664-D895-45C8-B32A-D969624336D4@adobe.com>

On Sep 27, 2013, at 12:15 PM, James Ross <w3c-20040125@james-ross.co.uk> wrote:

> > Date: Fri, 27 Sep 2013 10:18:44 +0200
> > From: simonp@opera.com
> > 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.

Greetings,
Dirk

> 
> -- 
> James Ross <james@james-ross.co.uk>
Received on Friday, 27 September 2013 10:27:49 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 September 2013 10:27:49 UTC