Commit 97a03b73 authored by Akikonata's avatar Akikonata

rename

parent 4305a492
......@@ -81,9 +81,9 @@
//设置km整体的z-index大小
//,zIndex : 1000
//设置初始加载时展开的层数和子节点数目阈值
//,expand: {
//layer: 0,
//sub: 0
//,defaultExpand: {
//defaultLayer: 0,
//defaultSubShow: 0
//}
};
} )();
\ No newline at end of file
......@@ -536,9 +536,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
updateLayoutVertical( _root );
translateNode( _root );
if ( historyPoint ) _root.setPoint( historyPoint.x, historyPoint.y );
var expandoptions = minder.getOptions( 'expand' );
var expandoptions = minder.getOptions( 'defaultExpand' );
var cur_layer = 0;
var expand_layer = expandoptions.layer;
var expand_layer = expandoptions.defaultLayer;
var mains = _root.getChildren();
for ( var i = 0; i < mains.length; i++ ) {
this.appendChildNode( _root, mains[ i ] );
......@@ -554,8 +554,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
} )();
next = [];
var layer_nolimit = ( expand_layer < 1 ) || ( !expand_layer ) || false;
debugger;
var sub_nolimit = ( expandoptions.sub < 1 ) || false;
var sub_nolimit = ( expandoptions.defaultSubShow < 1 ) || false;
var loopcontinue = function () {
return ( layer_nolimit ? ( _buffer.length !== 0 ) : ( _buffer.length !== 0 && cur_layer < expand_layer ) );
};
......@@ -564,7 +563,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
var layer_len = _buffer.length;
for ( var j = 0; j < layer_len; j++ ) {
var c = _buffer[ j ].getChildren();
if ( ( sub_nolimit || ( c.length <= expandoptions.sub ) ) && c.length !== 0 ) {
if ( ( sub_nolimit || ( c.length <= expandoptions.defaultSubShow ) ) && c.length !== 0 ) {
this.expandNode( _buffer[ j ] );
_buffer = _buffer.concat( _buffer[ j ].getChildren() );
}
......
......@@ -251,9 +251,9 @@ KityMinder.registerModule( "LayoutModule", function () {
'appendchildnode': 'appendchildnode',
'removenode': 'removenode'
},
expand: {
layer: 0,
sub: 0
'defaultExpand': {
'defaultLayer': 0,
'defaultSubShow': 0
}
}
};
......
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