Commit 4ed9e476 authored by campaign's avatar campaign

添加preference.js

parent f2461c03
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
,'adapter/node.js' ,'adapter/node.js'
,'adapter/contextmenu.js' ,'adapter/contextmenu.js'
,'adapter/dialog.js' ,'adapter/dialog.js'
,'adapter/preference.js'
,'protocal/xmind.js' ,'protocal/xmind.js'
,'protocal/freemind.js' ,'protocal/freemind.js'
,'protocal/mindmanager.js' ,'protocal/mindmanager.js'
...@@ -77,6 +78,7 @@ ...@@ -77,6 +78,7 @@
,'protocal/json.js' ,'protocal/json.js'
,'protocal/png.js' ,'protocal/png.js'
,'protocal/svg.js' ,'protocal/svg.js'
), ),
baseURL = 'src/'; baseURL = 'src/';
for (var i=0,pi;pi = paths[i++];) { for (var i=0,pi;pi = paths[i++];) {
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
//设置km整体的z-index大小 //设置km整体的z-index大小
//,zIndex : 1000 //,zIndex : 1000
//设置初始加载时展开的层数和子节点数目阈值 //设置初始加载时展开的层数和子节点数目阈值
//默认是全部展开,0表示全部展开
//,defaultExpand: { //,defaultExpand: {
//defaultLayer: 0, //defaultLayer: 0,
//defaultSubShow: 0 //defaultSubShow: 0
......
...@@ -18,14 +18,17 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", { ...@@ -18,14 +18,17 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
getOptions: function ( key ) { getOptions: function ( key ) {
return this._options[ key ]; return this._options[ key ];
}, },
setDefaultOptions: function ( key, val ) { setDefaultOptions: function ( key, val,cover) {
var obj = {}; var obj = {};
if ( Utils.isString( key ) ) { if ( Utils.isString( key ) ) {
obj[ key ] = val; obj[ key ] = val;
} else { } else {
obj = key; obj = key;
} }
utils.extend( this._options, obj, true ); utils.extend( this._options, obj, !cover );
},
setOptions: function ( key, val ) {
this.setDefaultOptions(key,val,true)
}, },
_initMinder: function () { _initMinder: function () {
......
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