ITeye博客

重写EXT树的双击事件,让双击不展开子节点

wengsibo · 2010-12-29 16:32 · ext · Web前端 · Markdown

//重写树的双击事件,让双击不展开子节点

Ext.override(Ext.tree.TreeNodeUI, {
		onDblClick : function(e) {
			e.preventDefault();
			if (this.disabled) {
				return;
			}
			if (this.checkbox) {
				this.toggleCheck();
			}
			if (!this.animating && this.node.hasChildNodes()) {
				var isExpand = this.node.ownerTree.doubleClickExpand;
				if (isExpand) {
					this.node.toggle();
				}
				;
			}
			this.fireEvent("dblclick", this.node, e);
		}
	});

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。