Commit f7a99014 authored by techird's avatar techird

publish

parent d3b29483
...@@ -1058,26 +1058,27 @@ kity.extendClass( Minder, { ...@@ -1058,26 +1058,27 @@ kity.extendClass( Minder, {
json = params.json || ( params.json = protocal.decode( local ) ); json = params.json || ( params.json = protocal.decode( local ) );
if( typeof json === 'object' && 'then' in json){ if ( typeof json === 'object' && 'then' in json ) {
var self = this; var self = this;
json.then( local, function(data){ json.then( local, function ( data ) {
self._afterImportData( data, params ); self._afterImportData( data, params );
}); } );
}else{ } else {
this._afterImportData( json, params ); this._afterImportData( json, params );
} }
return this; return this;
}, },
_afterImportData: function( json, params ){ _afterImportData: function ( json, params ) {
this._fire( new MinderEvent( 'preimport', params, false ) ); this._fire( new MinderEvent( 'preimport', params, false ) );
// 删除当前所有节点 // 删除当前所有节点
while ( this._root.getChildren().length ) { while ( this._root.getChildren().length ) {
this._root.removeChild( 0 ); this._root.removeChild( 0 );
} }
var curLayout = this._root.getData( "currentstyle" );
this._root.setData();
this._root.setData( "currentstyle", curLayout );
importNode( this._root, json, this ); importNode( this._root, json, this );
this._fire( new MinderEvent( 'import', params, false ) ); this._fire( new MinderEvent( 'import', params, false ) );
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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