Commit e37d42d1 authored by techird's avatar techird

dev

parent 47715138
Subproject commit ff63268509146ce38933b6cd4920ae0a9659ac17 Subproject commit a1524e4d22c448d4e7e2766b7029f2e51db04f0c
...@@ -107,6 +107,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", { ...@@ -107,6 +107,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
}, },
setData: function ( name, value ) { setData: function ( name, value ) {
if ( arguments.length == 1 && typeof ( arguments[ 0 ] ) == 'object' ) {
Utils.extend( this.data, arguments[ 0 ] );
}
this.data[ name ] = value; this.data[ name ] = value;
}, },
......
...@@ -50,9 +50,10 @@ KityMinder.registerModule( "ExampleModule", function () { ...@@ -50,9 +50,10 @@ KityMinder.registerModule( "ExampleModule", function () {
"defaultOptions": { "defaultOptions": {
"test": 123 "test": 123
}, },
// TODO: 初始化完成后执行的函数 // TODO: 初始化完成后执行的函数
"init": function ( config ) { "init": function ( config ) {
console.log( "init", config ); // console.log( "init", config );
}, },
// TODO: 需要注册的命令 // TODO: 需要注册的命令
...@@ -77,7 +78,7 @@ KityMinder.registerModule( "ExampleModule", function () { ...@@ -77,7 +78,7 @@ KityMinder.registerModule( "ExampleModule", function () {
if ( this._cheated[ 0 ] == e.keyCode ) { if ( this._cheated[ 0 ] == e.keyCode ) {
this._cheated.shift(); this._cheated.shift();
} }
console.log( this._cheated ); // console.log( this._cheated );
if ( this._cheated.length === 0 ) { if ( this._cheated.length === 0 ) {
this.execCommand( 'cheat' ); this.execCommand( 'cheat' );
} }
......
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