Class YAHOO.util.Point
Package: | YAHOO.util |
Class: | Point |
Extends: | Region |
Defined In: | dom.js |
A point is a region that is special in that it represents a single point on
the grid.
Public Properties
|
1 : Int |
Region |
The region's top extent as index, for symmetry with set/getXY |
|
bottom : Int |
Region |
The region's bottom extent |
|
left : Int |
Region |
The region's left extent |
|
right : int |
Region |
The region's right extent |
|
top : Int |
Region |
The region's top extent |
|
x : Int |
Point |
The X position of the point, which is also the right, left and index zero (for Dom.getXY symmetry) |
|
y : Int |
Point |
The Y position of the point, which is also the top, bottom and index one (for Dom.getXY symmetry) |
Public Methods
|
Point() |
Point |
|
|
contains(Region region ) : Boolean |
Region |
Returns true if this region contains the region passed in |
|
getArea() : Int |
Region |
Returns the area of the region |
|
getRegion(HTMLElement el ) : Region |
Region |
<static> Returns a region that is occupied by the DOM element |
|
intersect(Region region ) : Region |
Region |
Returns the region where the passed in region overlaps with this one |
|
toString() : string |
Region |
toString |
|
union(Region region ) : Region |
Region |
Returns the region representing the smallest region that can contain both
the passed in region and this region. |
Public Events
This class has no public events.
Property Details
1
public Int 1
The region's top extent as index, for symmetry with set/getXY
This property is defined by
Region.
bottom
public Int bottom
The region's bottom extent
This property is defined by
Region.
left
public Int left
The region's left extent
This property is defined by
Region.
right
public int right
The region's right extent
This property is defined by
Region.
top
public Int top
The region's top extent
This property is defined by
Region.
x
public Int x
The X position of the point, which is also the right, left and index zero (for Dom.getXY symmetry)
This property is defined by Point.
y
public Int y
The Y position of the point, which is also the top, bottom and index one (for Dom.getXY symmetry)
This property is defined by Point.
Constructor Details
Point
public function Point()
Method Details
contains
public function contains(Region region
)
Returns true if this region contains the region passed in
Parameters:
region
: RegionThe region to evaluate
Returns:
This method is defined by
Region.
getArea
public function getArea()
Returns the area of the region
This method is defined by
Region.
getRegion
public function getRegion(HTMLElement el
)
<static> Returns a region that is occupied by the DOM element
Parameters:
el
: HTMLElementThe element
Returns:
This method is defined by
Region.
intersect
public function intersect(Region region
)
Returns the region where the passed in region overlaps with this one
This method is defined by
Region.
toString
public function toString()
toString
Parameters:
Returns:
string
the region properties
This method is defined by
Region.
union
public function union(Region region
)
Returns the region representing the smallest region that can contain both
the passed in region and this region.
This method is defined by
Region.