Raster.getBounds( element, relParent )

Returns an object containing the upper-left corner (x,y) coordinates and dimmensions of the given element.

Parameters

Name Type   Description
element object A document element, such as a DIV for example.
relParent object A document element, parent of above element such as a DIV for example. When this argument is specified, the element's position is returned relative to the given parent element. If this argument is not specified, DOCUMENT.BODY is used.

Returns

Type Description
object An object containing the upper-left corner (x,y) coordinates and dimmensions of the given element. The returned object has the following fields:
x       X coordinate of element's upper-left corner.
y       Y coordinate of element's upper-left corner.
width   Element's width
height  Element's height
Home Examples Download License
 
Copyright © 2010-2017 Edwin R. López