Commit 459155f6 authored by Akikonata's avatar Akikonata

fixed

parent b8955dbe
...@@ -510,7 +510,6 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -510,7 +510,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
}, },
initStyle: function ( expandall ) { initStyle: function ( expandall ) {
var _root = minder.getRoot(); var _root = minder.getRoot();
//debugger;
var historyPoint = _root.getPoint(); var historyPoint = _root.getPoint();
if ( historyPoint ) historyPoint = JSON.parse( JSON.stringify( historyPoint ) ); if ( historyPoint ) historyPoint = JSON.parse( JSON.stringify( historyPoint ) );
minder.handelNodeInsert( _root ); minder.handelNodeInsert( _root );
...@@ -572,6 +571,13 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -572,6 +571,13 @@ KityMinder.registerModule( "LayoutDefault", function () {
( ( sub_nolimit || ( c.length <= expandoptions.defaultSubShow ) ) && ( layer_nolimit || ( cur_layer <= expand_layer ) ) ) || ( ( sub_nolimit || ( c.length <= expandoptions.defaultSubShow ) ) && ( layer_nolimit || ( cur_layer <= expand_layer ) ) ) ||
_buffer[ j ].getLayout().expand _buffer[ j ].getLayout().expand
) && c.length !== 0 ) { ) && c.length !== 0 ) {
if ( _buffer[ j ].getLayout().expand ) {
console.log( (
(
( ( sub_nolimit || ( c.length <= expandoptions.defaultSubShow ) ) && ( layer_nolimit || ( cur_layer <= expand_layer ) ) ) ||
_buffer[ j ].getLayout().expand
) && c.length !== 0 ) );
}
this.expandNode( _buffer[ j ] ); this.expandNode( _buffer[ j ] );
_buffer = _buffer.concat( _buffer[ j ].getChildren() ); _buffer = _buffer.concat( _buffer[ j ].getChildren() );
} }
...@@ -590,9 +596,6 @@ KityMinder.registerModule( "LayoutDefault", function () { ...@@ -590,9 +596,6 @@ KityMinder.registerModule( "LayoutDefault", function () {
if ( Layout ) { if ( Layout ) {
oldExpand = Layout.expand; oldExpand = Layout.expand;
} }
if ( oldExpand ) {
alert( 'aru' );
}
node.clearLayout(); node.clearLayout();
node.getContRc().clear(); node.getContRc().clear();
Layout = node.getLayout(); Layout = node.getLayout();
......
...@@ -40,7 +40,12 @@ KityMinder.registerModule( "LayoutModule", function () { ...@@ -40,7 +40,12 @@ KityMinder.registerModule( "LayoutModule", function () {
var _root = this.getRoot(); var _root = this.getRoot();
_root.preTraverse( function ( n ) { _root.preTraverse( function ( n ) {
var oldExpand;
if ( n.getLayout() ) {
oldExpand = n.getLayout().expand;
}
n.clearLayout(); n.clearLayout();
n.getLayout().expand = oldExpand;
} ); } );
this.getLayoutStyle( curStyle ).initStyle.call( this, expandall ); this.getLayoutStyle( curStyle ).initStyle.call( this, expandall );
this.fire( 'afterinitstyle' ); this.fire( 'afterinitstyle' );
...@@ -251,12 +256,7 @@ KityMinder.registerModule( "LayoutModule", function () { ...@@ -251,12 +256,7 @@ KityMinder.registerModule( "LayoutModule", function () {
"cloneNode": function ( e ) { "cloneNode": function ( e ) {
var target = e.targetNode; var target = e.targetNode;
var source = e.sourceNode; var source = e.sourceNode;
target.clearLayout(); target._layout = utils.extend( {}, source._layout );
var sourceLayout = source.getLayout();
var targetLayout = target.getLayout();
targetLayout.expand = utils.clone(sourceLayout.expand);
console.log( targetLayout );
} }
}, },
'contextmenu': [ { 'contextmenu': [ {
......
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