PDA

View Full Version : cancel Tree expand on dblclick



iliakan
13 Aug 2007, 6:19 PM
When I dblclick a folder -> I'd like to edit it, not open.

How about checking dblclick event value like it is done for click ?


(TreeNodeUI.js)
if (this.fireEvent("dblclick", this.node, e) !== false && !this.animating && this.node.hasChildNodes()) {
this.node.toggle();
}


Or should I do something tricky like


tree.on('beforeexpand', function(node, event) {
if (event.type == 'dblclick') { DO THE DBLCLICK STUFF; return false; }
}