badallen
19 Apr 2012, 5:09 PM
Hi, I have the following code that pretty much copied the portal sample but add the listeners -
Ext.define('Ext.app.Portlet', {
extend: 'Ext.panel.Panel',
alias: 'widget.portlet',
layout: 'fit',
anchor: '100%',
frame: true,
closable: true,
collapsible: true,
animCollapse: true,
draggable: {
moveOnDrag: false,
listeners: {
dragend: function(){
console.log('dragend');
}
}
},
cls: 'x-portlet',
// Override Panel's default doClose to provide a custom fade out effect
// when a portlet is removed from the portal
doClose: function() {
//some code
}
});
The issue is it does not seem like dragend is fired at all!
The reason why I need this is I need to persist the display order of the panel after the drag. Do you guys have any better idea on how to do this?
Thanks!
Ext.define('Ext.app.Portlet', {
extend: 'Ext.panel.Panel',
alias: 'widget.portlet',
layout: 'fit',
anchor: '100%',
frame: true,
closable: true,
collapsible: true,
animCollapse: true,
draggable: {
moveOnDrag: false,
listeners: {
dragend: function(){
console.log('dragend');
}
}
},
cls: 'x-portlet',
// Override Panel's default doClose to provide a custom fade out effect
// when a portlet is removed from the portal
doClose: function() {
//some code
}
});
The issue is it does not seem like dragend is fired at all!
The reason why I need this is I need to persist the display order of the panel after the drag. Do you guys have any better idea on how to do this?
Thanks!