Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / source / Resizable.html
index 79222d1..427294f 100644 (file)
@@ -1,17 +1,12 @@
-<html>
-<head>
-  <title>The source code</title>
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body  onload="prettyPrint();">
-    <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.Resizable"></div>/**\r
+<html>\r
+<head>\r
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    \r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <pre class="prettyprint lang-js"><div id="cls-Ext.Resizable"></div>/**\r
  * @class Ext.Resizable\r
  * @extends Ext.util.Observable\r
  * <p>Applies drag handles to an element to make it resizable. The drag handles are inserted into the element \r
@@ -144,6 +139,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
@@ -464,6 +462,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
@@ -765,6 +767,6 @@ Ext.Resizable.Handle.prototype = {
         this.el = null;\r
     }\r
 };\r
-</pre>
-</body>
+</pre>    \r
+</body>\r
 </html>
\ No newline at end of file