X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..6a7e4474cba9d8be4b2ec445e10f1691f7277c50:/docs/source/ext-base-region.html diff --git a/docs/source/ext-base-region.html b/docs/source/ext-base-region.html index 0fb60366..ebe891cc 100644 --- a/docs/source/ext-base-region.html +++ b/docs/source/ext-base-region.html @@ -1,85 +1,91 @@ - - - - The source code - - - - -
	Ext.lib.Region = function(t, r, b, l) {
-		var me = this;
-        me.top = t;
-        me[1] = t;
-        me.right = r;
-        me.bottom = b;
-        me.left = l;
-        me[0] = l;
-    };
-
-    Ext.lib.Region.prototype = {
-        contains : function(region) {
-	        var me = this;
-            return ( region.left >= me.left &&
-                     region.right <= me.right &&
-                     region.top >= me.top &&
-                     region.bottom <= me.bottom );
-
-        },
-
-        getArea : function() {
-	        var me = this;
-            return ( (me.bottom - me.top) * (me.right - me.left) );
-        },
-
-        intersect : function(region) {
-            var me = this,
-            	t = Math.max(me.top, region.top),
-            	r = Math.min(me.right, region.right),
-            	b = Math.min(me.bottom, region.bottom),
-            	l = Math.max(me.left, region.left);
-
-            if (b >= t && r >= l) {
-                return new Ext.lib.Region(t, r, b, l);
-            }
-        },
-        
-        union : function(region) {
-	        var me = this,
-            	t = Math.min(me.top, region.top),
-            	r = Math.max(me.right, region.right),
-            	b = Math.max(me.bottom, region.bottom),
-            	l = Math.min(me.left, region.left);
-
-            return new Ext.lib.Region(t, r, b, l);
-        },
-
-        constrainTo : function(r) {
-	        var me = this;
-            me.top = me.top.constrain(r.top, r.bottom);
-            me.bottom = me.bottom.constrain(r.top, r.bottom);
-            me.left = me.left.constrain(r.left, r.right);
-            me.right = me.right.constrain(r.left, r.right);
-            return me;
-        },
-
-        adjust : function(t, l, b, r) {
-	        var me = this;
-            me.top += t;
-            me.left += l;
-            me.right += r;
-            me.bottom += b;
-            return me;
-        }
-    };
-
-    Ext.lib.Region.getRegion = function(el) {
-        var p = Ext.lib.Dom.getXY(el),
-        	t = p[1],
-        	r = p[0] + el.offsetWidth,
-        	b = p[1] + el.offsetHeight,
-        	l = p[0];
-
-        return new Ext.lib.Region(t, r, b, l);
-    };
- + + + + The source code + + + + +
/*!
+ * Ext JS Library 3.2.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+	Ext.lib.Region = function(t, r, b, l) {
+		var me = this;
+        me.top = t;
+        me[1] = t;
+        me.right = r;
+        me.bottom = b;
+        me.left = l;
+        me[0] = l;
+    };
+
+    Ext.lib.Region.prototype = {
+        contains : function(region) {
+	        var me = this;
+            return ( region.left >= me.left &&
+                     region.right <= me.right &&
+                     region.top >= me.top &&
+                     region.bottom <= me.bottom );
+
+        },
+
+        getArea : function() {
+	        var me = this;
+            return ( (me.bottom - me.top) * (me.right - me.left) );
+        },
+
+        intersect : function(region) {
+            var me = this,
+            	t = Math.max(me.top, region.top),
+            	r = Math.min(me.right, region.right),
+            	b = Math.min(me.bottom, region.bottom),
+            	l = Math.max(me.left, region.left);
+
+            if (b >= t && r >= l) {
+                return new Ext.lib.Region(t, r, b, l);
+            }
+        },
+        
+        union : function(region) {
+	        var me = this,
+            	t = Math.min(me.top, region.top),
+            	r = Math.max(me.right, region.right),
+            	b = Math.max(me.bottom, region.bottom),
+            	l = Math.min(me.left, region.left);
+
+            return new Ext.lib.Region(t, r, b, l);
+        },
+
+        constrainTo : function(r) {
+	        var me = this;
+            me.top = me.top.constrain(r.top, r.bottom);
+            me.bottom = me.bottom.constrain(r.top, r.bottom);
+            me.left = me.left.constrain(r.left, r.right);
+            me.right = me.right.constrain(r.left, r.right);
+            return me;
+        },
+
+        adjust : function(t, l, b, r) {
+	        var me = this;
+            me.top += t;
+            me.left += l;
+            me.right += r;
+            me.bottom += b;
+            return me;
+        }
+    };
+
+    Ext.lib.Region.getRegion = function(el) {
+        var p = Ext.lib.Dom.getXY(el),
+        	t = p[1],
+        	r = p[0] + el.offsetWidth,
+        	b = p[1] + el.offsetHeight,
+        	l = p[0];
+
+        return new Ext.lib.Region(t, r, b, l);
+    };
+ \ No newline at end of file