mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 23:44:54 +01:00
Copy and Paste of nodes was not working. Fixed.
This commit is contained in:
parent
82ff47220d
commit
7a401b648e
@ -270,6 +270,11 @@ mindplot.CommandContext = new Class({
|
|||||||
return mindmap.createNode(mindplot.NodeModel.MAIN_TOPIC_TYPE);
|
return mindmap.createNode(mindplot.NodeModel.MAIN_TOPIC_TYPE);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addTopic:function (topic) {
|
||||||
|
var mindmap = this._designer.getMindmap();
|
||||||
|
return mindmap.addBranch(topic.getModel());
|
||||||
|
},
|
||||||
|
|
||||||
connect:function (childTopic, parentTopic) {
|
connect:function (childTopic, parentTopic) {
|
||||||
childTopic.connectTo(parentTopic, this._designer._workspace);
|
childTopic.connectTo(parentTopic, this._designer._workspace);
|
||||||
},
|
},
|
||||||
|
@ -41,6 +41,8 @@ mindplot.commands.AddTopicCommand = new Class({
|
|||||||
var parentTopic = commandContext.findTopics(parentId)[0];
|
var parentTopic = commandContext.findTopics(parentId)[0];
|
||||||
commandContext.connect(topic, parentTopic);
|
commandContext.connect(topic, parentTopic);
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
commandContext.addTopic(topic);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select just created node ...
|
// Select just created node ...
|
||||||
|
Loading…
Reference in New Issue
Block a user