Commit 459155f6 authored by Akikonata's avatar Akikonata

fixed

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