- }\r
- \r
- this.addEvents(\r
- <div id="event-Ext.Resizable-beforeresize"></div>/**\r
- * @event beforeresize\r
- * Fired before resize is allowed. Set {@link #enabled} to false to cancel resize.\r
- * @param {Ext.Resizable} this\r
- * @param {Ext.EventObject} e The mousedown event\r
- */\r
- 'beforeresize',\r
- <div id="event-Ext.Resizable-resize"></div>/**\r
- * @event resize\r
- * Fired after a resize.\r
- * @param {Ext.Resizable} this\r
- * @param {Number} width The new width\r
- * @param {Number} height The new height\r
- * @param {Ext.EventObject} e The mouseup event\r
- */\r
- 'resize'\r
- );\r
- \r
- if(this.width !== null && this.height !== null){\r
- this.resizeTo(this.width, this.height);\r
- }else{\r
- this.updateChildSize();\r
- }\r
- if(Ext.isIE){\r
- this.el.dom.style.zoom = 1;\r
- }\r
- Ext.Resizable.superclass.constructor.call(this);\r
-};\r
-\r
-Ext.extend(Ext.Resizable, Ext.util.Observable, {\r
+ // legacy\r
+ this.corner = this.southeast;\r
+ \r
+ if(this.handles.indexOf('n') != -1 || this.handles.indexOf('w') != -1){\r
+ this.updateBox = true;\r
+ } \r
+ \r
+ this.activeHandle = null;\r
+ \r
+ if(this.resizeChild){\r
+ if(typeof this.resizeChild == 'boolean'){\r
+ this.resizeChild = Ext.get(this.el.dom.firstChild, true);\r
+ }else{\r
+ this.resizeChild = Ext.get(this.resizeChild, true);\r
+ }\r
+ }\r
+ \r
+ if(this.adjustments == 'auto'){\r
+ var rc = this.resizeChild;\r
+ var hw = this.west, he = this.east, hn = this.north, hs = this.south;\r
+ if(rc && (hw || hn)){\r
+ rc.position('relative');\r
+ rc.setLeft(hw ? hw.el.getWidth() : 0);\r
+ rc.setTop(hn ? hn.el.getHeight() : 0);\r
+ }\r
+ this.adjustments = [\r
+ (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0),\r
+ (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.el.getHeight() : 0) -1 \r
+ ];\r
+ }\r
+ \r
+ if(this.draggable){\r
+ 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
+ <div id="event-Ext.Resizable-beforeresize"></div>/**\r
+ * @event beforeresize\r
+ * Fired before resize is allowed. Set {@link #enabled} to false to cancel resize.\r
+ * @param {Ext.Resizable} this\r
+ * @param {Ext.EventObject} e The mousedown event\r
+ */\r
+ 'beforeresize',\r
+ <div id="event-Ext.Resizable-resize"></div>/**\r
+ * @event resize\r
+ * Fired after a resize.\r
+ * @param {Ext.Resizable} this\r
+ * @param {Number} width The new width\r
+ * @param {Number} height The new height\r
+ * @param {Ext.EventObject} e The mouseup event\r
+ */\r
+ 'resize'\r
+ );\r
+ \r
+ if(this.width !== null && this.height !== null){\r
+ this.resizeTo(this.width, this.height);\r
+ }else{\r
+ this.updateChildSize();\r
+ }\r
+ if(Ext.isIE){\r
+ this.el.dom.style.zoom = 1;\r
+ }\r
+ Ext.Resizable.superclass.constructor.call(this); \r
+ },\r