mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
- Fix Uncaught Icon can no be found., line:3940
This commit is contained in:
parent
3f173ec2f1
commit
1efa24f2aa
@ -18,7 +18,7 @@
|
||||
|
||||
mindplot.commands.RemoveFeatureFromTopicCommand = new Class({
|
||||
Extends:mindplot.Command,
|
||||
initialize: function(topicId, featureId) {
|
||||
initialize:function (topicId, featureId) {
|
||||
$assert($defined(topicId), 'topicId can not be null');
|
||||
$assert(featureId, 'iconModel can not be null');
|
||||
|
||||
@ -28,7 +28,7 @@ mindplot.commands.RemoveFeatureFromTopicCommand = new Class({
|
||||
this._oldFeature = null;
|
||||
},
|
||||
|
||||
execute: function(commandContext) {
|
||||
execute:function (commandContext) {
|
||||
var topic = commandContext.findTopics(this._topicId)[0];
|
||||
|
||||
var feature = topic.findFeatureById(this._featureId);
|
||||
@ -36,11 +36,13 @@ mindplot.commands.RemoveFeatureFromTopicCommand = new Class({
|
||||
this._oldFeature = feature;
|
||||
},
|
||||
|
||||
undoExecute: function(commandContext) {
|
||||
undoExecute:function (commandContext) {
|
||||
var topic = commandContext.findTopics(this._topicId)[0];
|
||||
|
||||
var feature = this._oldFeature;
|
||||
topic.addFeature(feature.getType(), feature.getAttributes());
|
||||
var newFeature = topic.addFeature(feature.getType(), feature.getAttributes());
|
||||
this._featureId = newFeature.getModel().getId();
|
||||
|
||||
this._oldFeature = null;
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user