Commit ca15319e authored by campaign's avatar campaign

by zhanyi

parent cf4ee9a0
window.KITYMINDER_CONFIG = { window.KITYMINDER_CONFIG = {
//设置主题
//layoutstyle : 'default'
//回退相关选项
//maxUndoCount:20 //最大可回退的次数,默认20
}; };
\ No newline at end of file
...@@ -9,13 +9,9 @@ ...@@ -9,13 +9,9 @@
* @description KityMinder 使用类 * @description KityMinder 使用类
*/ */
var MinderDefaultOptions = {
"layoutstyle": "default"
};
var Minder = KityMinder.Minder = kity.createClass( "KityMinder", { var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
constructor: function ( options ) { constructor: function ( options ) {
this._options = Utils.extend( window.KITYMINDER_CONFIG || {}, MinderDefaultOptions, options ); this._options = Utils.extend( window.KITYMINDER_CONFIG || {}, options );
this._initEvents(); this._initEvents();
this._initMinder(); this._initMinder();
this._initSelection(); this._initSelection();
......
...@@ -21,7 +21,6 @@ kity.extendClass( Minder, { ...@@ -21,7 +21,6 @@ kity.extendClass( Minder, {
this._modules[ name ] = moduleDeals; this._modules[ name ] = moduleDeals;
if ( moduleDeals.init ) { if ( moduleDeals.init ) {
this.setDefaultOptions( moduleDeals.defaultOptions || {});
moduleDeals.init.call( me, this._options ); moduleDeals.init.call( me, this._options );
} }
...@@ -39,6 +38,9 @@ kity.extendClass( Minder, { ...@@ -39,6 +38,9 @@ kity.extendClass( Minder, {
} }
} }
if(moduleDeals.defaultOptions){
this.setDefaultOptions(moduleDeals.defaultOptions);
}
//添加模块的快捷键 //添加模块的快捷键
if(moduleDeals.addShortcutKeys){ if(moduleDeals.addShortcutKeys){
this.addShortcutKeys(moduleDeals.addShortcutKeys) this.addShortcutKeys(moduleDeals.addShortcutKeys)
......
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