mrsunshine
24 Jun 2010, 2:31 PM
The function setDraggable in Ext.Container is incomplete.
if the container is already dragable and you try to setDraggable(false), the dragablity will not removed or deactivated, see code.
Second the param autoShow is never used.
/**
* Sets a Component as draggable.
* @param {Boolean} draggable
* @param {Boolean} autoShow
*/
setDraggable : function(draggable, autoShow) {
this.draggable = draggable;
if (this.rendered) {
if (draggable !== false) {
this.draggable = new Ext.util.Draggable(this.el, Ext.apply({}, this.dragConfig || {}));
this.relayEvents(this.draggable, ['dragstart', 'drag', 'dragend']);
}
}
},
if the container is already dragable and you try to setDraggable(false), the dragablity will not removed or deactivated, see code.
Second the param autoShow is never used.
/**
* Sets a Component as draggable.
* @param {Boolean} draggable
* @param {Boolean} autoShow
*/
setDraggable : function(draggable, autoShow) {
this.draggable = draggable;
if (this.rendered) {
if (draggable !== false) {
this.draggable = new Ext.util.Draggable(this.el, Ext.apply({}, this.dragConfig || {}));
this.relayEvents(this.draggable, ['dragstart', 'drag', 'dragend']);
}
}
},