Commit 0d18502e authored by Akikonata's avatar Akikonata

优化

parent 0a9329d1
......@@ -465,9 +465,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
translateNode( set[ i ] );
updateConnectAndshIcon( set[ i ] );
}
if(this.isNodeSelected(node)){
this.highlightNode(node)
}
if ( this.isNodeSelected( node ) ) {
this.highlightNode( node )
}
},
initStyle: function () {
var _root = minder.getRoot();
......@@ -514,10 +514,19 @@ KityMinder.registerModule( "LayoutDefault", function () {
if ( historyPoint ) {
_root.setPoint( historyPoint );
}
var j = 0;
var me = this;
var ITV = window.setInterval( function () {
me.appendChildNode( _cleanbuffer[ j ].getLayout().parent, _cleanbuffer[ j ] );
j++;
if ( j === _cleanbuffer.length ) {
window.clearInterval( ITV );
}
}, 0 );
//重组结构
for ( var j = 0; j < _cleanbuffer.length; j++ ) {
this.appendChildNode( _cleanbuffer[ j ].getLayout().parent, _cleanbuffer[ j ] );
}
// for ( var j = 0; j < _cleanbuffer.length; j++ ) {
// this.appendChildNode( _cleanbuffer[ j ].getLayout().parent, _cleanbuffer[ j ] );
// }
_root.setPoint( _root.getLayout().x, _root.getLayout().y );
},
appendChildNode: function ( parent, node, focus, sibling ) {
......
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