Re: DOM APIs - Get & Set Element Center Point

Hi, Francis-

Francis Hemsher wrote (on 1/23/10 8:11 AM):
>
> A developer who dynamically positions the location of elements is
> continually computing the center point of the element: Generally via
> the bounding box location and size.

Yes, methods to get the centerpoint and centroid of a shape (or 
collection of shapes) would be very useful.

A related reason I often use getBBox to find the centerpoint of a shape 
is when positioning text in that shape.  One way to address that 
specific case is to have better layout markup, but doesn't eliminate the 
need for shortcut methods like getCenter and getCentroid (as I would 
prefer to call them).

Regards-
-Doug Schepers
W3C Team Contact, SVG and WebApps WGs

Received on Sunday, 24 January 2010 00:28:19 UTC