Commit 30e37603 authored by campaign's avatar campaign

by zhanyi

parents d5ae8599 7ae2c4e5
Subproject commit 682bc4b4200af7a7c4997758307bc9b1b6e4e291
Subproject commit 8b33f729a570f3501769d16ad4c329c0e7f4e08d
......@@ -419,9 +419,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
drawNode( node );
},
initStyle: function () {
minder.getRenderContainer().clear();
//绘制root并且调整到正确位置
var _root = this.getRoot();
minder.getRenderContainer().clear();
minder.handelNodeInsert( _root );
var rc = new RootShape( _root );
translateNode( _root );
......@@ -454,6 +454,13 @@ KityMinder.registerModule( "LayoutDefault", function () {
_buffer.shift();
}
},
updateLayout: function ( node ) {
drawNode( node );
var set = updateLayoutHorizon( node );
for ( var i = 0; i < set.length; i++ ) {
translateNode( set[ i ] );
}
},
appendChildNode: function ( parent, node, index ) {
minder.handelNodeInsert( node );
var _root = this.getRoot();
......
This diff is collapsed.
......@@ -70,11 +70,9 @@ KityMinder.registerModule( "LayoutModule", function () {
} );
var switchLayout = function ( km, style ) {
var _root = km.getRoot();
km.getRenderContainer().clear();
_root.preTraverse( function ( n ) {
n.clearLayout();
n.setPoint();
n.getRenderContainer().clear();
} );
km.setCurrentStyle( style );
km.initStyle();
......
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