Commit 4828f6be authored by campaign's avatar campaign

修复节点内容删光的问题

parent 4d023087
......@@ -30,10 +30,14 @@ KityMinder.registerModule('TextEditModule', function() {
.setEndOffset(textShape.getContent().length)
.setColor(color);
receiver
.setMinderNode(node)
.updateContainerRangeBySel();
receiver.minderNode.setTmpData('_lastTextContent',receiver.textShape.getContent());
km.setStatus('inputready');
}
......@@ -58,6 +62,17 @@ KityMinder.registerModule('TextEditModule', function() {
return;
}
if(receiver.minderNode){
var textShape = receiver.minderNode.getTextShape();
if(textShape && textShape.getOpacity() === 0){
receiver.minderNode.setText(receiver.minderNode.getTmpData('_lastTextContent'));
receiver.minderNode.render();
receiver.minderNode.getTextShape().setOpacity(1);
km.layout(300);
}
}
mouseDownStatus = true;
selectionReadyShow = sel.isShow();
......
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