mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 23:44:54 +01:00
Fix copy and paste issue.
This commit is contained in:
parent
bf3bd5c1c7
commit
1c1fc2ca96
@ -57,12 +57,20 @@ mindplot.commands.AddTopicCommand = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
undoExecute:function (commandContext) {
|
undoExecute:function (commandContext) {
|
||||||
// Finally, delete the topic from the workspace ...
|
// Delete disconnected the nodes. Create a copy of the topics ...
|
||||||
|
var clonedModel = [];
|
||||||
|
this._models.each(function (model) {
|
||||||
|
clonedModel.push(model.clone());
|
||||||
|
});
|
||||||
|
|
||||||
|
// Finally, remove the nodes ...
|
||||||
this._models.each(function (model) {
|
this._models.each(function (model) {
|
||||||
|
|
||||||
var topicId = model.getId();
|
var topicId = model.getId();
|
||||||
var topic = commandContext.findTopics(topicId)[0];
|
var topic = commandContext.findTopics(topicId)[0];
|
||||||
commandContext.deleteTopic(topic);
|
commandContext.deleteTopic(topic);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
|
this._models = clonedModel;
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user