Commit 63e5cf18 authored by Akikonata's avatar Akikonata

修正了select引用传错的问题

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