Commit 0c512f85 authored by Akikonata's avatar Akikonata

changed function calling

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