Commit fcd6b5aa authored by campaign's avatar campaign

by zhanyi

parent a501f441
......@@ -69,6 +69,9 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
this._shortcutkeys = {};
this._bindshortcutKeys();
},
isTextEditStatus:function(){
return false;
},
addShortcutKeys: function ( cmd, keys ) {
var obj = {},km = this;
if ( keys ) {
......@@ -122,6 +125,10 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
current++;
}
});
//todo 暂时通过receiver判断
if(me.isTextEditStatus()){
return;
}
if(current == keys.length){
if ( me.queryCommandState( i ) != -1 )
me.execCommand( i );
......
......@@ -12,7 +12,9 @@ KityMinder.registerModule( "TextEditModule", function () {
var lastEvtPosition,dir = 1;
km.isTextEditStatus = function(){
return km.receiver.isTextEditStatus();
}
return {
//插入光标
......@@ -27,7 +29,7 @@ KityMinder.registerModule( "TextEditModule", function () {
var textShape = node.getTextShape();
textShape.setStyle('cursor','default');
if ( this.isSingleSelect() && node.isSelected() && e.kityEvent.targetShape.getType().toLowerCase()== 'text') {
if ( this.isSingleSelect() && node.isSelected()) {// && e.kityEvent.targetShape.getType().toLowerCase()== 'text'
sel.collapse();
node.getTextShape().setStyle('cursor','text');
......
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