How to change the scope of 'this' object in the Ext.Resizable.dd.onMouseUp event ?
Hi all!
I'm trying to extend the Ext.Panel object to make it draggable and resizable. Here's my code :
Code:
Ext.extend(Ext.ux.InputZone, Ext.Panel, {
setResizable: function(){
if (!this.resizer){
this.resizer = new Ext.Resizable(this.id, {
transparent:true,
dynamic:true,
handles: 's e se',
draggable:true,
minWidth: this.minWidth || 50,
minHeight: this.minHeight || 15
});
// install event handlers
this.resizer.on({
beforeresize: {
scope: this,
fn: function(resizer, e) {
// some code here
}
},
resize: {
scope: this,
fn: function(resizer, width, height, e) {
// some code here
}
}
});
this.resizer.dd.onMouseUp = function(e){
// 'this' refers to the resizer.dd object !
}
return this;
}
}
}); // end of extend
I would like to update some properties of my Ext.ux.InputZone object when I drop it. I've tried the onMouseUp function of the resizer.dd object but I can't access my object in this function ?
Does anyone know how could I do that ?
Thanks.
disizben