Commit 65a97743 authored by campaign's avatar campaign

by zhanyi

parent b88195ef
......@@ -30,4 +30,5 @@ kity.extendClass( Minder, {
km.renderNode( nodes );
}
}
} );
\ No newline at end of file
......@@ -219,5 +219,8 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
},
getTextShape:function(){
return this.getRenderContainer().getShapesByType('text')[0]
},
isSelected : function(){
return this.getData( 'highlight' ) === true
}
} );
\ No newline at end of file
......@@ -11,12 +11,12 @@ KityMinder.registerModule( "TextEditModule", function () {
},
"events": {
'beforemousedown':function(e){
if(this.isSingleSelect()){
var node = this.getSelectedNode();
var node = e.getTargetNode();
if(node){
var textShape = node.getTextShape();
// node.getRenderContainer().setStyle('cursor','text');
textShape.setStyle('cursor','default');
if(node.isSelected()){
node.getTextShape().setStyle('cursor','text');
receiver.setTextEditStatus(true)
.setCursor(cursor)
.setKityMinder(this)
......@@ -29,7 +29,9 @@ KityMinder.registerModule( "TextEditModule", function () {
.updateCursor()
.setRange(range);
}
}else{
receiver.clear();
}
}
}
};
......
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