Commit 869129ba authored by campaign's avatar campaign

texteditnode

parent 0b706bfa
...@@ -31,11 +31,16 @@ KityMinder.registerModule('TextEditModule', function() { ...@@ -31,11 +31,16 @@ KityMinder.registerModule('TextEditModule', function() {
.updateContainerRangeBySel(); .updateContainerRangeBySel();
km.setStatus('inputready'); km.setStatus('inputready');
} }
} }
km.textEditNode = function(node){
inputStatusReady(node);
km.setStatus('textedit');
receiver.updateSelectionShow();
};
return { return {
'events': { 'events': {
'ready': function() { 'ready': function() {
...@@ -178,39 +183,20 @@ KityMinder.registerModule('TextEditModule', function() { ...@@ -178,39 +183,20 @@ KityMinder.registerModule('TextEditModule', function() {
}, },
'normal.dblclick textedit.dblclick inputready.dblclick': function(e) { 'normal.dblclick textedit.dblclick inputready.dblclick': function(e) {
inputStatusReady(e.getTargetNode()); var node = e.getTargetNode();
if(node){
inputStatusReady(e.getTargetNode());
km.setStatus('textedit');
km.setStatus('textedit'); receiver.updateSelectionShow();
}
receiver.updateSelectionShow();
}, },
// 'restoreScene': function() { 'restoreScene': function() {
// var node = this.getSelectedNode(); receiver.clear();
// if (node && this.isSingleSelect()) { inputStatusReady(this.getSelectedNode());
// var textShape = node.getRenderer('TextRenderer').getRenderShape(); },
// sel.setHide();
// sel.setStartOffset(0);
// sel.setEndOffset(textShape.getContent().length);
//
// receiver.setTextEditStatus(true)
// .setSelection(sel)
// .setKityMinder(this)
// .setMinderNode(node)
// .setTextShape(textShape)
// .setRange(range)
// .setBaseOffset()
// .setContainerStyle()
// .setSelectionHeight()
// .setContainerTxt(textShape.getContent())
// .updateRange(range).setTextEditStatus(true);
// km.setStatus('normal');
//
// sel.setData('relatedNode', node);
// } else {
// receiver.clear();
// }
//
// },
'stopTextEdit': function() { 'stopTextEdit': function() {
receiver.clear(); receiver.clear();
km.setStatus('normal'); km.setStatus('normal');
......
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