X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..refs/heads/master:/docs/source/Region.html diff --git a/docs/source/Region.html b/docs/source/Region.html index de62db12..fa643251 100644 --- a/docs/source/Region.html +++ b/docs/source/Region.html @@ -3,8 +3,8 @@ The source code - - + + @@ -16,14 +16,11 @@
/**
- * @class Ext.util.Region
- * @extends Object
+ * This class represents a rectangular region in X,Y space, and performs geometric
+ * transformations or tests upon the region.
  *
- * <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>
+ * This class may be used to compare the document regions occupied by elements.
  */
-
 Ext.define('Ext.util.Region', {
 
     /* Begin Definitions */
@@ -31,20 +28,20 @@ Ext.define('Ext.util.Region', {
     requires: ['Ext.util.Offset'],
 
     statics: {
-        /**
+        /**
          * @static
          * 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.
+         * @param {String/HTMLElement/Ext.Element} el An element ID, htmlElement or Ext.Element representing an element in the document.
          * @returns {Ext.util.Region} region
          */
         getRegion: function(el) {
             return Ext.fly(el).getPageBox(true);
         },
 
-        /**
+        /**
          * @static
-         * 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.
+         * Creates a Region from a "box" Object which contains four numeric properties `top`, `right`, `bottom` and `left`.
+         * @param {Object} o An object with `top`, `right`, `bottom` and `left` properties.
          * @return {Ext.util.Region} region The Region constructed based on the passed object
          */
         from: function(o) {
@@ -72,6 +69,7 @@ Ext.define('Ext.util.Region', {
     /**
      * Checks if this region completely contains the region that is passed in.
      * @param {Ext.util.Region} region
+     * @return {Boolean}
      */
     contains : function(region) {
         var me = this;
@@ -105,6 +103,7 @@ Ext.define('Ext.util.Region', {
     /**
      * Returns the smallest region that contains the current AND targetRegion.
      * @param {Ext.util.Region} region
+     * @return {Ext.util.Region} a new region
      */
     union : function(region) {
         var me = this,
@@ -119,6 +118,7 @@ Ext.define('Ext.util.Region', {
     /**
      * Modifies the current region to be constrained to the targetRegion.
      * @param {Ext.util.Region} targetRegion
+     * @return {Ext.util.Region} this
      */
     constrainTo : function(r) {
         var me = this,
@@ -136,6 +136,7 @@ Ext.define('Ext.util.Region', {
      * @param {Number} right right offset
      * @param {Number} bottom bottom offset
      * @param {Number} left left offset
+     * @return {Ext.util.Region} this
      */
     adjust : function(t, r, b, l) {
         var me = this;
@@ -148,8 +149,8 @@ Ext.define('Ext.util.Region', {
 
     /**
      * Get the offset amount of a point outside the region
-     * @param {String} axis optional
-     * @param {Ext.util.Point} p the point
+     * @param {String} [axis]
+     * @param {Ext.util.Point} [p] the point
      * @return {Ext.util.Offset}
      */
     getOutOfBoundOffset: function(axis, p) {
@@ -201,8 +202,8 @@ Ext.define('Ext.util.Region', {
 
     /**
      * Check whether the point / offset is out of bound
-     * @param {String} axis optional
-     * @param {Ext.util.Point/Number} p the point / offset
+     * @param {String} [axis]
+     * @param {Ext.util.Point/Number} [p] the point / offset
      * @return {Boolean}
      */
     isOutOfBound: function(axis, p) {
@@ -236,12 +237,13 @@ Ext.define('Ext.util.Region', {
         return (p < this.y || p > this.bottom);
     },
 
-    /*
-     * Restrict a point within the region by a certain factor.
-     * @param {String} axis Optional
-     * @param {Ext.util.Point/Ext.util.Offset/Object} p
-     * @param {Number} factor
+    /**
+     * Restrict a point within the region by a certain factor.
+     * @param {String} [axis]
+     * @param {Ext.util.Point/Ext.util.Offset/Object} [p]
+     * @param {Number} [factor]
      * @return {Ext.util.Point/Ext.util.Offset/Object/Number}
+     * @private
      */
     restrict: function(axis, p, factor) {
         if (Ext.isObject(axis)) {
@@ -272,11 +274,12 @@ Ext.define('Ext.util.Region', {
         }
     },
 
-    /*
-     * Restrict an offset within the region by a certain factor, on the x-axis
+    /**
+     * Restrict an offset within the region by a certain factor, on the x-axis
      * @param {Number} p
-     * @param {Number} factor The factor, optional, defaults to 1
-     * @return
+     * @param {Number} [factor=1] The factor.
+     * @return {Number}
+     * @private
      */
     restrictX : function(p, factor) {
         if (!factor) {
@@ -292,10 +295,12 @@ Ext.define('Ext.util.Region', {
         return p;
     },
 
-    /*
-     * Restrict an offset within the region by a certain factor, on the y-axis
+    /**
+     * Restrict an offset within the region by a certain factor, on the y-axis
      * @param {Number} p
-     * @param {Number} factor The factor, optional, defaults to 1
+     * @param {Number} [factor] The factor, defaults to 1
+     * @return {Number}
+     * @private
      */
     restrictY : function(p, factor) {
         if (!factor) {
@@ -311,9 +316,10 @@ Ext.define('Ext.util.Region', {
         return p;
     },
 
-    /*
-     * Get the width / height of this region
+    /**
+     * Get the width / height of this region
      * @return {Object} an object with width and height properties
+     * @private
      */
     getSize: function() {
         return {
@@ -332,7 +338,7 @@ Ext.define('Ext.util.Region', {
 
     /**
      * Copy the values of another Region to this Region
-     * @param {Region} The region to copy from.
+     * @param {Ext.util.Region} p The region to copy from.
      * @return {Ext.util.Region} This Region
      */
     copyFrom: function(p) {
@@ -355,9 +361,9 @@ Ext.define('Ext.util.Region', {
 
     /**
      * 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.
+     * @param {Ext.util.Offset/Object} x Object containing the `x` and `y` properties.
      * Or the x value is using the two argument form.
-     * @param {Number} The y value unless using an Offset object.
+     * @param {Number} y The y value unless using an Offset object.
      * @return {Ext.util.Region} this This Region
      */
     translateBy: function(x, y) {