Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / src / widgets / Resizable.js
index a746fa4..836b7e2 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * Ext JS Library 3.0.3
+ * Ext JS Library 3.1.0
  * Copyright(c) 2006-2009 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
@@ -137,6 +137,9 @@ Ext.Resizable = function(el, config){
         this.dd = this.dynamic ? \r
             this.el.initDD(null) : this.el.initDDProxy(null, {dragElId: this.proxy.id});\r
         this.dd.setHandleElId(this.resizeChild ? this.resizeChild.id : this.el.id);\r
+        if(this.constrainTo){\r
+            this.dd.constrainTo(this.constrainTo);\r
+        }\r
     }\r
     \r
     this.addEvents(\r
@@ -457,6 +460,10 @@ new Ext.Panel({
         if(!this.dynamic){\r
             this.proxy.hide();\r
         }\r
+        if(this.draggable && this.constrainTo){\r
+            this.dd.resetConstraints();\r
+            this.dd.constrainTo(this.constrainTo);\r
+        }\r
         return box;\r
     },\r
 \r