Commit 87230381 authored by Akikonata's avatar Akikonata

added queryState

parent 917d1306
var Command = kity.createClass( "Command", {
constructor:function(){
},
execute: function (minder, args) {
......@@ -12,14 +12,6 @@ var Command = kity.createClass( "Command", {
},
queryState: function() {
return 0;
},
queryValue: function() {
return 0;
},
setContentChanged: function( val ) {
},
......@@ -35,4 +27,12 @@ var Command = kity.createClass( "Command", {
isSelectionChanged: function() {
return false;
}
});
\ No newline at end of file
});
Command.queryState: function(km) {
return 0;
}
Command.queryValue: function(km) {
return 0;
}
\ No newline at end of file
......@@ -55,7 +55,6 @@ kity.extendClass(KityMinder, {
if(moduleDealsEvents){
for(var _key in moduleDealsEvents){
var bindEvs = _key.split(" ");
console.log(bindEvs);
var func = moduleDealsEvents[_key];
for (var _i = 0; _i < bindEvs.length; _i++){
me.on(bindEvs[_i],func);
......@@ -152,11 +151,11 @@ kity.extendClass(KityMinder, {
},
queryCommandState: function( name ) {
this.commands[name].queryState(this);
},
queryCommandValue: function( name ) {
this.commands[name].queryValue(this);
}
});
......
......@@ -25,5 +25,7 @@
KityMinder.registerModule("defaulttest",mindermoduleDefaultTest);
var myMinder = new KityMinder();
myMinder.execCommand("testCommand","test1",function(){alert(a)},{a:1,b:2});
myMinder.queryCommandState("testCommand");
myMinder.queryCommandValue("testCommand");
</script>
</html>
\ No newline at end of file
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