Commit 658a0978 authored by campaign's avatar campaign

配置默认项目

parent 744c5568
......@@ -81,10 +81,9 @@
//设置km整体的z-index大小
//,zIndex : 1000
//设置初始加载时展开的层数和子节点数目阈值
,
expand: {
layer: 2, //最小为1
sub: 10
}
//,expand: {
//layer: 0,
//sub: 0
//}
};
} )();
\ No newline at end of file
......@@ -539,7 +539,7 @@ KityMinder.registerModule( "LayoutDefault", function () {
if ( historyPoint ) _root.setPoint( historyPoint.x, historyPoint.y );
var expandoptions = minder.getOptions( 'expand' );
var cur_layer = 0;
var expand_layer = expandoptions && expandoptions.layer;
var expand_layer = expandoptions.layer;
var mains = _root.getChildren();
for ( var i = 0; i < mains.length; i++ ) {
this.appendChildNode( _root, mains[ i ] );
......@@ -554,9 +554,9 @@ KityMinder.registerModule( "LayoutDefault", function () {
return items;
} )();
next = [];
var layer_nolimit = ( !expandoptions ) || ( expand_layer < 1 ) || ( !expand_layer ) || false;
var layer_nolimit = ( expand_layer < 1 ) || ( !expand_layer ) || false;
//debugger;
var sub_nolimit = ( !expandoptions ) || ( !expandoptions.sub ) || ( expandoptions.sub < 0 ) || false;
var sub_nolimit = ( expandoptions.sub < 0 ) || false;
var loopcontinue = function () {
return ( layer_nolimit ? ( _buffer.length !== 0 ) : ( _buffer.length !== 0 && cur_layer < expand_layer ) );
};
......
......@@ -250,6 +250,10 @@ KityMinder.registerModule( "LayoutModule", function () {
'appendsiblingnode': 'appendsiblingnode',
'appendchildnode': 'appendchildnode',
'removenode': 'removenode'
},
expand:{
layer:0,
sub: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