Class Index | File Index

Classes


Namespace YAHOO.util.Region

YAHOO.util A region is a representation of an object on a grid. It is defined by the top, right, bottom, left extents, so is rectangular by default. If other shapes are required, this class could be extended to support it.
Defined in: dom.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
A region is a representation of an object on a grid.
Field Summary
Field Attributes Field Name and Description
 
The region's bottom extent
 
The region's left extent
 
The region's right extent
 
top
The region's top extent
Method Summary
Method Attributes Method Name and Description
 
contains(region)
Returns true if this region contains the region passed in
 
Returns the area of the region
<static>  
YAHOO.util.Region.getRegion(el)
Returns a region that is occupied by the DOM element
 
intersect(region)
Returns the region where the passed in region overlaps with this one
 
toString
 
union(region)
Returns the region representing the smallest region that can contain both the passed in region and this region.
Namespace Detail
YAHOO.util.Region
A region is a representation of an object on a grid. It is defined by the top, right, bottom, left extents, so is rectangular by default. If other shapes are required, this class could be extended to support it.
Parameters:
{Int} t
the top extent
{Int} r
the right extent
{Int} b
the bottom extent
{Int} l
the left extent
Field Detail
{Int} bottom
The region's bottom extent

{Int} left
The region's left extent

{int} right
The region's right extent

{Int} top
The region's top extent
Method Detail
{Boolean} contains(region)
Returns true if this region contains the region passed in
Parameters:
{Region} region
The region to evaluate
Returns:
{Boolean} True if the region is contained with this region, else false

{Int} getArea()
Returns the area of the region
Returns:
{Int} the region's area

<static> {Region} YAHOO.util.Region.getRegion(el)
Returns a region that is occupied by the DOM element
Parameters:
{HTMLElement} el
The element
Returns:
{Region} The region that the element occupies

{Region} intersect(region)
Returns the region where the passed in region overlaps with this one
Parameters:
{Region} region
The region that intersects
Returns:
{Region} The overlap region, or null if there is no overlap

toString()
toString
Returns:
string the region properties

{Region} union(region)
Returns the region representing the smallest region that can contain both the passed in region and this region.
Parameters:
{Region} region
The region that to create the union with
Returns:
{Region} The union region

Documentation generated by JsDoc Toolkit 2.0.0 on Thu Dec 02 2010 15:18:59 GMT+0100 (CET)