Commit 16ef799a authored by Akikonata's avatar Akikonata

fixed bug

parent 04d9a2bb
...@@ -212,10 +212,13 @@ KityMinder.registerModule( "LayoutBottom", function () { ...@@ -212,10 +212,13 @@ KityMinder.registerModule( "LayoutBottom", function () {
Layout.x = parentLayout.x + nodeStyles.sub.margin[ 3 ]; Layout.x = parentLayout.x + nodeStyles.sub.margin[ 3 ];
} }
} }
if ( action === "append" || action === "change" ) { if ( action === "append" ) {
Layout.branchheight = node.getRenderContainer().getHeight() + nodeStyles.sub.margin[ 0 ] + nodeStyles.sub.margin[ 2 ]; Layout.branchheight = node.getRenderContainer().getHeight() + nodeStyles.sub.margin[ 0 ] + nodeStyles.sub.margin[ 2 ];
} }
var prt = parent; var prt = parent;
if ( action === "change" ) {
prt = node;
}
//自底向上更新branchheight //自底向上更新branchheight
while ( prt.getType() !== "main" ) { while ( prt.getType() !== "main" ) {
var c = prt.getChildren(); var c = prt.getChildren();
...@@ -360,6 +363,13 @@ KityMinder.registerModule( "LayoutBottom", function () { ...@@ -360,6 +363,13 @@ KityMinder.registerModule( "LayoutBottom", function () {
translateNode( set[ i ] ); translateNode( set[ i ] );
updateConnectAndshIcon( set[ i ] ); updateConnectAndshIcon( set[ i ] );
} }
if ( node.getType() === "sub" ) {
var set1 = updateLayoutMain();
for ( var j = 0; j < set1.length; j++ ) {
translateNode( set1[ j ] );
updateConnectAndshIcon( set1[ j ] );
}
}
}, },
initStyle: function () { initStyle: function () {
var _root = minder.getRoot(); var _root = minder.getRoot();
......
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