| Package: | Ext |
| Class: | Resizable |
| Extends: | Observable |
| Defined In: | Resizable.js |
Applies drag handles to an element to make it resizable. The drag handles are inserted into the element and positioned absolute. Some elements, such as a textarea or image, don't support this. To overcome that, you can wrap the textarea in a div and set "resizeChild" to true (or the id of the textarea), or set wrap:true in your config and the element will be wrapped for you automatically.
var resizer = new Ext.Resizable('element-id', {
resizeChild : false,
adjustments : [0, 0],
minWidth : 5,
minHeight : 5,
maxWidth : 10000,
maxHeight : 10000,
enabled : true,
wrap: false, // true to wrap the element
width: null, // initial size
height: null, // initial size
animate : false,
duration : .35,
dynamic : false,
handles : false,
multiDirectional : false,
disableTrackOver : false,
easing : YAHOO.util.Easing ? YAHOO.util.Easing.easeOutStrong : null,
widthIncrement : 0,
heightIncrement : 0,
pinned : false,
width : null,
height : null,
preserveRatio : false,
transparent: false,
minX: 0,
minY: 0,
draggable: false
});
resizer.on('resize', myHandler);
To hide a particular handle, set its display to none in CSS, or through script:
resizer.east.setDisplayed(false);
| Method | Defined By | |
|---|---|---|
Resizable(String/HTMLElement/Ext.Element el, Object config) |
Resizable | |
| Create a new resizable component | ||
addListener(String eventName, Function handler, [Object options]) : void |
Observable | |
| Appends an event handler to this component | ||
fireEvent(String eventName, Object... args) : Boolean |
Observable | |
| Fires the specified event with the passed parameters (minus the event name). | ||
on(String eventName, Function handler, [Object options]) : void |
Observable | |
| Appends an event handler to this element (shorthand for addListener) | ||
| purgeListeners() : void | Observable | |
| Removes all listeners for this object | ||
removeListener(String eventName, Function handler, [Object scope]) : void |
Observable | |
| Removes a listener | ||
un(String eventName, Function handler, [Object scope]) : void |
Observable | |
| Removes a listener (shorthand for removeListener) | ||
public function Resizable(String/HTMLElement/Ext.Element el, Object config)
el : String/HTMLElement/Ext.Elementconfig : Objectpublic function addListener(String eventName, Function handler, [Object options])
eventName : Stringhandler : Functionoptions : Objectvoidpublic function fireEvent(String eventName, Object... args)
eventName : Stringargs : Object...Booleanpublic function on(String eventName, Function handler, [Object options])
eventName : Stringhandler : Functionoptions : Objectvoidpublic function purgeListeners()
voidpublic function removeListener(String eventName, Function handler, [Object scope])
eventName : Stringhandler : Functionscope : Objectvoidpublic function un(String eventName, Function handler, [Object scope])
eventName : Stringhandler : Functionscope : Objectvoid