Commit fcd6b5aa authored by campaign's avatar campaign

by zhanyi

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