Commit 026e0336 authored by campaign's avatar campaign

添加了getSelectNode

parent 1af03e5a
......@@ -12,7 +12,6 @@ kity.extendClass( Minder, function(){
_initSelection: function () {
this._selectedNodes = [];
},
getSelectedNodes: function () {
//如果没有选中节点,默认是root节点
if(this._selectedNodes.length == 0){
......@@ -21,6 +20,9 @@ kity.extendClass( Minder, function(){
//不能克隆返回,会对当前选区操作,从而影响querycommand
return this._selectedNodes;
},
getSelectedNode:function(){
return this.getSelectedNodes()[0]
},
removeAllSelectedNodes:function(){
utils.each(this.getSelectedNodes(),function(i,n){
unhighlightNode(this,n);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment