Commit bdfe210e authored by campaign's avatar campaign

Merge remote-tracking branch 'origin/dev' into dev

parents 2cb35953 5da9a4aa
Subproject commit 8b33f729a570f3501769d16ad4c329c0e7f4e08d
Subproject commit cfe7d5a248f0634d85dab3e51dc2d90d2d23ac5e
......@@ -355,12 +355,20 @@ KityMinder.registerModule( "LayoutDefault", function () {
//以某个节点为seed对水平方向进行调整(包括调整子树)
var updateLayoutHorizon = function ( node ) {
var nodeLayout = node.getData( "layout" );
var effectSet = [ node ]; //返回受影响(即需要进行下一步translate的节点)
var parent = node.getParent();
var appendside = nodeLayout.appendside;
var selfWidth = node.getRenderContainer().getWidth();
if ( parent ) {
var effectSet = []; //返回受影响(即需要进行下一步translate的节点)
var _buffer = [ node ];
while ( _buffer.length !== 0 ) {
var parent = _buffer[ 0 ].getParent();
_buffer = _buffer.concat( _buffer[ 0 ].getChildren() );
if ( !parent ) {
effectSet.push( _buffer[ 0 ] );
_buffer.shift();
continue;
}
var nodeLayout = _buffer[ 0 ].getData( "layout" );
var appendside = nodeLayout.appendside;
var selfWidth = _buffer[ 0 ].getRenderContainer().getWidth();
var parentLayout = parent.getData( "layout" );
var parentWidth = parent.getRenderContainer().getWidth();
if ( parentLayout.align === "center" ) parentWidth = parentWidth / 2;
......@@ -376,6 +384,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
default:
break;
}
effectSet.push( _buffer[ 0 ] );
_buffer.shift();
}
return effectSet;
};
......
......@@ -421,7 +421,6 @@ KityMinder.registerModule( "LayoutGreen", function () {
initStyle: function () {
//绘制root并且调整到正确位置
var _root = this.getRoot();
minder.getRenderContainer().clear();
minder.handelNodeInsert( _root );
var rc = new RootShape( _root );
translateNode( _root );
......
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