fixed the resizable text area with IE problem fixed the ad space with IE problem merged the 7.2.0 and 7.1.4 change logs
710 lines
No EOL
15 KiB
HTML
710 lines
No EOL
15 KiB
HTML
|
|
<html>
|
|
<head>
|
|
<title>
|
|
JavaScript Documentation -
|
|
|
|
YAHOO.util.Region
|
|
|
|
</title>
|
|
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="header">
|
|
<h1>JavaScript Documentation</h1>
|
|
<h3><a href="./index.html">DOM Utility</a></h3>
|
|
|
|
<div class="breadcrumbs">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="./index.html">DOM Utility</a>
|
|
>
|
|
<strong>YAHOO.util.Region</strong>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="body">
|
|
|
|
|
|
<div class="nav">
|
|
<div class="module resources">
|
|
<ul class="content">
|
|
<li><a href="overview-tree.html">Tree View</a></li>
|
|
<li><a href="index-all.html">Element Index</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div class="module">
|
|
<h4><a href="./allclasses-noframe.html">Classes</a></h4>
|
|
<ul class="content">
|
|
|
|
|
|
|
|
<li>
|
|
<a href="YAHOO.util.Dom.html">
|
|
YAHOO.util.Dom</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="YAHOO.util.Point.html">
|
|
YAHOO.util.Point</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="YAHOO.util.Region.html">
|
|
YAHOO.util.Region</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="module">
|
|
<h4><a href="./overview-summary.html">Files</a></h4>
|
|
<ul class="content">
|
|
|
|
<li>
|
|
<a href="overview-summary-Dom.js.html">
|
|
Dom.js</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="overview-summary-Region.js.html">
|
|
Region.js</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="pri">
|
|
<div class="main">
|
|
|
|
<h2>Class YAHOO.util.Region</h2>
|
|
<pre>Object
|
|
|
|
|
+--<b>YAHOO.util.Region</b>
|
|
</pre>
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
<!-- Class definition -->
|
|
<div class="class-def">
|
|
<div class="class-name">
|
|
<span class="class-attribs">
|
|
|
|
</span>
|
|
<span class="class-type">class</span>
|
|
<b>YAHOO.util.Region</b>
|
|
</div>
|
|
<div class="class-extends">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="summary">
|
|
<p>
|
|
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.
|
|
|
|
|
|
</p>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<!-- ======== QUICK LINKS ======== -->
|
|
<div class="quick-links">
|
|
<strong>Quick Links:</strong>
|
|
|
|
|
|
<a href="#field_summary">Field Summary</a>
|
|
|
|
|
|
|
|
|
<a href="#constructor_summary">Constructor Summary</a>
|
|
|
|
|
|
|
|
|
<a href="#methodSummary">Method Summary</a> |
|
|
|
|
|
|
<a href="#fieldDetails">Field Details</a>
|
|
|
|
|
|
|
|
|
<a href="#constructorDetails">Constructor Details</a>
|
|
|
|
|
|
|
|
|
<a href="#methodDetails">Method Details</a>
|
|
|
|
</div>
|
|
<!-- ======== END QUICK LINKS ======== -->
|
|
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
|
|
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
|
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
<div class="section field summaries">
|
|
<h3><a name="field_summary">Field Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
<table border="1" cellpadding="3" cellspacing="0">
|
|
|
|
<tr>
|
|
<td class="flags">int</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#bottom">bottom</a>
|
|
</code>
|
|
<div class="description">
|
|
The region's bottom extent
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">int</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#left">left</a>
|
|
</code>
|
|
<div class="description">
|
|
The region's left extent
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">int</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#right">right</a>
|
|
</code>
|
|
<div class="description">
|
|
The region's right extent
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">int</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#top">top</a>
|
|
</code>
|
|
<div class="description">
|
|
The region's top extent
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- =========== END FIELD SUMMARY =========== -->
|
|
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<div class="section contructor summaries">
|
|
<h3><a name="constructor_summary">Constructor Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
<code class="spec">
|
|
<a href="YAHOO.util.Region.html#YAHOO.util.Region()">YAHOO.util.Region</a>
|
|
</code>
|
|
<div class="description">
|
|
A region is a representation of an object on a grid.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<div class="section method summaries">
|
|
<h3><a name="methodSummary">Method Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
<table border="1" cellpadding="3" cellspacing="0">
|
|
|
|
<tr>
|
|
<td class="flags">boolean</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#contains">contains</a>
|
|
(<Region> region)
|
|
</code>
|
|
<div class="description">
|
|
Returns true if this region contains the region passed in
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">int</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#getArea">getArea</a>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
Returns the area of the region
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Region</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#intersect">intersect</a>
|
|
(<Region> region)
|
|
</code>
|
|
<div class="description">
|
|
Returns the region where the passed in region overlaps with this one
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Object</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#toString">toString</a>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
toString
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Region</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#union">union</a>
|
|
(<Region> region)
|
|
</code>
|
|
<div class="description">
|
|
Returns the region representing the smallest region that can contain both
|
|
the passed in region and this region.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Region</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#getRegion">getRegion</a>
|
|
(<HTMLElement> el)
|
|
</code>
|
|
<div class="description">
|
|
Returns a region that is occupied by the DOM element
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ========== END METHOD SUMMARY =========== -->
|
|
|
|
|
|
<!-- ============ FIELD DETAIL START =========== -->
|
|
|
|
<div class="section field details">
|
|
<h3><a name="fieldDetails">Field Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
|
|
<h4><a name="bottom">bottom</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
int
|
|
|
|
<strong>bottom</strong>
|
|
</code>
|
|
<div class="description">
|
|
The region's bottom extent
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="left">left</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
int
|
|
|
|
<strong>left</strong>
|
|
</code>
|
|
<div class="description">
|
|
The region's left extent
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="right">right</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
int
|
|
|
|
<strong>right</strong>
|
|
</code>
|
|
<div class="description">
|
|
The region's right extent
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="top">top</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
int
|
|
|
|
<strong>top</strong>
|
|
</code>
|
|
<div class="description">
|
|
The region's top extent
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ============ FIELD DETAIL END =========== -->
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
|
|
|
<div class="section constructor details">
|
|
<h3><a name="constructorDetails">Constructor Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
<h4><a name="YAHOO.util.Region()">YAHOO.util.Region</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
<strong>YAHOO.util.Region</strong>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>t</code> -
|
|
the top extent
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>r</code> -
|
|
the right extent
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>b</code> -
|
|
the bottom extent
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>l</code> -
|
|
the left extent
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
|
|
|
|
|
<!-- ============ METHOD DETAIL START ========== -->
|
|
|
|
<div class="section method details">
|
|
<h3><a name="methodDetails">Method Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
|
|
<h4><a name="contains">contains</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
boolean
|
|
<strong>contains</strong>
|
|
(<Region> region)
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns true if this region contains the region passed in
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>region</code> -
|
|
The region to evaluate
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> True if the region is contained with this region, else false</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="getArea">getArea</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
int
|
|
<strong>getArea</strong>
|
|
()
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the area of the region
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> the region's area</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="intersect">intersect</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Region
|
|
<strong>intersect</strong>
|
|
(<Region> region)
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the region where the passed in region overlaps with this one
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>region</code> -
|
|
The region that intersects
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> The overlap region, or null if there is no overlap</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="toString">toString</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Object
|
|
<strong>toString</strong>
|
|
()
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
toString
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd>string the region properties</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="union">union</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Region
|
|
<strong>union</strong>
|
|
(<Region> region)
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the region representing the smallest region that can contain both
|
|
the passed in region and this region.
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>region</code> -
|
|
The region that to create the union with
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> The union region</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="getRegion">getRegion</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Region
|
|
<strong>getRegion</strong>
|
|
(<HTMLElement> el)
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns a region that is occupied by the DOM element
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>el</code> -
|
|
The element
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> The region that the element occupies </dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ============ METHOD DETAIL END ========== -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
|
|
|
|
<div id="footer">
|
|
<hr />
|
|
Copyright © 2006 Yahoo! Inc. All rights reserved.
|
|
</div>
|
|
|
|
|
|
</body>
|
|
</html> |