Commit 0c512f85 authored by Akikonata's avatar Akikonata

changed function calling

parent e1d7962a
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</body> </body>
<script> <script>
minder = new KityMinder.Minder(null,{ minder = new KityMinder.Minder({
modules:["ExampleModule","RenderModule"], modules:["ExampleModule","RenderModule"],
renderTo: document.body renderTo: document.body
}); });
...@@ -41,6 +41,6 @@ ...@@ -41,6 +41,6 @@
}] }]
}] }]
}); });
minder.execCommand( 'renderroot' ); minder.execCommand( 'renderroot',minder);
</script> </script>
</html> </html>
\ No newline at end of file
...@@ -23,6 +23,7 @@ kity.extendClass( Minder, { ...@@ -23,6 +23,7 @@ kity.extendClass( Minder, {
var TargetCommand, command, cmdArgs, eventParams, stoped; var TargetCommand, command, cmdArgs, eventParams, stoped;
TargetCommand = this._getCommand( name ); TargetCommand = this._getCommand( name );
console.log( TargetCommand );
if ( !TargetCommand ) { if ( !TargetCommand ) {
return false; return false;
} }
......
...@@ -13,6 +13,7 @@ var MinderDefaultOptions = {}; ...@@ -13,6 +13,7 @@ var MinderDefaultOptions = {};
var Minder = KityMinder.Minder = kity.createClass( "KityMinder", { var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
constructor: function ( options ) { constructor: function ( options ) {
this._options = options;
options = Utils.extend( window.KITYMINDER_CONFIG || {}, MinderDefaultOptions, options || {} ); options = Utils.extend( window.KITYMINDER_CONFIG || {}, MinderDefaultOptions, options || {} );
this._initEvents(); this._initEvents();
this._initMinder( options ); this._initMinder( options );
......
...@@ -11,7 +11,8 @@ kity.extendClass( Minder, { ...@@ -11,7 +11,8 @@ kity.extendClass( Minder, {
} }
return _list; return _list;
} )(); } )();
var _configModules = this._options.modules || _modulesList; var _configModules = ( this._options ? this._options.modules : false ) || _modulesList;
console.log( _configModules );
if ( _modules ) { if ( _modules ) {
var me = this; var me = this;
for ( var i = 0; i < _configModules.length; i++ ) { for ( var i = 0; i < _configModules.length; i++ ) {
......
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