</span> * @class Ext.util.Region
* @extends Object
*
- * Represents a rectangular region and provides a number of utility methods
- * to compare regions.
+ * <p>This class represents a rectangular region in X,Y space, and performs geometric
+ * transformations or tests upon the region.</p>
+ * <p>This class may be used to compare the document regions occupied by elements.</p>
*/
Ext.define('Ext.util.Region', {
statics: {
<span id='Ext-util-Region-method-getRegion'> /**
</span> * @static
- * @param {Mixed} el A string, DomElement or Ext.core.Element representing an element
- * on the page.
- * @returns {Ext.util.Region} region
* Retrieves an Ext.util.Region for a particular element.
+ * @param {Mixed} el An element ID, htmlElement or Ext.core.Element representing an element in the document.
+ * @returns {Ext.util.Region} region
*/
getRegion: function(el) {
return Ext.fly(el).getPageBox(true);
<span id='Ext-util-Region-method-from'> /**
</span> * @static
- * @param {Object} o An object with top, right, bottom, left properties
- * @return {Ext.util.Region} region The region constructed based on the passed object
+ * Creates a Region from a "box" Object which contains four numeric properties <code>top</code>, <code>right</code>, <code>bottom</code> and <code>left</code>.
+ * @param {Object} o An object with <code>top</code>, <code>right</code>, <code>bottom</code> and <code>left</code> properties.
+ * @return {Ext.util.Region} region The Region constructed based on the passed object
*/
from: function(o) {
return new this(o.top, o.right, o.bottom, o.left);
/* End Definitions */
<span id='Ext-util-Region-method-constructor'> /**
-</span> * @constructor
- * @param {Number} top Top
- * @param {Number} right Right
- * @param {Number} bottom Bottom
- * @param {Number} left Left
+</span> * Creates a region from the bounding sides.
+ * @param {Number} top Top The topmost pixel of the Region.
+ * @param {Number} right Right The rightmost pixel of the Region.
+ * @param {Number} bottom Bottom The bottom pixel of the Region.
+ * @param {Number} left Left The leftmost pixel of the Region.
*/
constructor : function(t, r, b, l) {
var me = this;
},
<span id='Ext-util-Region-method-copy'> /**
-</span> * Copy a new instance
+</span> * Create a copy of this Region.
* @return {Ext.util.Region}
*/
copy: function() {
<span id='Ext-util-Region-method-copyFrom'> /**
</span> * Copy the values of another Region to this Region
* @param {Region} The region to copy from.
- * @return {Ext.util.Point} this This point
+ * @return {Ext.util.Region} This Region
*/
copyFrom: function(p) {
var me = this;
return this;
},
-<span id='Ext-util-Region-method-toString'> /**
-</span> * Dump this to an eye-friendly string, great for debugging
+ /*
+ * Dump this to an eye-friendly string, great for debugging
* @return {String}
*/
toString: function() {
return "Region[" + this.top + "," + this.right + "," + this.bottom + "," + this.left + "]";
},
-
<span id='Ext-util-Region-method-translateBy'> /**
</span> * Translate this region by the given offset amount
* @param {Ext.util.Offset/Object} offset Object containing the <code>x</code> and <code>y</code> properties.