Commit 63e5cf18 authored by Akikonata's avatar Akikonata

修正了select引用传错的问题

parent 94f12382
......@@ -25,8 +25,9 @@ kity.extendClass( Minder, function () {
return this.getSelectedNodes()[ 0 ];
},
removeAllSelectedNodes: function () {
var me = this;
Utils.each( this.getSelectedNodes(), function ( i, n ) {
unhighlightNode( this, n );
unhighlightNode( me, n );
} );
this._selectedNodes = [];
},
......@@ -35,7 +36,7 @@ kity.extendClass( Minder, function () {
var me = this;
utils.each( utils.isArray( nodes ) ? nodes : [ nodes ], function ( i, n ) {
me._selectedNodes.push( n );
highlightNode( this, n );
highlightNode( me, n );
} );
return this;
},
......
......@@ -256,7 +256,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
node.setData( "branchheight", branchheight );
}
var siblings = parent.getData( appendside + "List" ) || parent.getChildren();
var getActualHeight = function ( node, appendside ) {
var getChildHeight = function ( node, appendside ) {
var sum = 0;
var children = node.getData( appendside + "List" ) || node.getChildren();
for ( var i = 0; i < children.length; i++ ) {
......@@ -272,8 +272,8 @@ KityMinder.registerModule( "LayoutDefault", function () {
var prt = parent;
do {
var minH = prt.getRenderContainer().getHeight() + marginTop + marginBottom;
var actualH = getActualHeight( prt, appendside );
var branchH = ( minH > actualH ? minH : actualH );
var childH = getChildHeight( prt, appendside );
var branchH = ( minH > childH ? minH : childH );
if ( prt.getParent() ) {
prt.setData( "branchheight", branchH );
......
......@@ -26,7 +26,6 @@ KityMinder.registerModule( "LayoutModule", function () {
base: Command,
execute: function ( km, node ) {
var parent = km.getSelectedNode();
return km.appendChildNode( parent, node );
}
};
......
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