mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +01:00
-Fix problem on element undo...
This commit is contained in:
parent
80940b8529
commit
3a0c79a2a8
@ -30,16 +30,21 @@ mindplot.DesignerActionRunner = new Class({
|
|||||||
command.execute(this._context);
|
command.execute(this._context);
|
||||||
this._undoManager.enqueue(command);
|
this._undoManager.enqueue(command);
|
||||||
this.fireChangeEvent();
|
this.fireChangeEvent();
|
||||||
|
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
undo: function() {
|
undo: function() {
|
||||||
this._undoManager.execUndo(this._context);
|
this._undoManager.execUndo(this._context);
|
||||||
this.fireChangeEvent();
|
this.fireChangeEvent();
|
||||||
|
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
|
||||||
},
|
},
|
||||||
|
|
||||||
redo: function() {
|
redo: function() {
|
||||||
this._undoManager.execRedo(this._context);
|
this._undoManager.execRedo(this._context);
|
||||||
this.fireChangeEvent();
|
this.fireChangeEvent();
|
||||||
|
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
fireChangeEvent : function () {
|
fireChangeEvent : function () {
|
||||||
|
@ -207,7 +207,9 @@ mindplot.DragTopic = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
isFreeLayoutOn: function() {
|
isFreeLayoutOn: function() {
|
||||||
return this._isFreeLayoutEnabled;
|
// return this._isFreeLayoutEnabled;
|
||||||
|
// Disable free layout ...
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -231,7 +231,6 @@ mindplot.StandaloneActionDispatcher = new Class({
|
|||||||
|
|
||||||
execute:function (command) {
|
execute:function (command) {
|
||||||
this._actionRunner.execute(command);
|
this._actionRunner.execute(command);
|
||||||
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -84,11 +84,13 @@ mindplot.commands.DeleteCommand = new Class({
|
|||||||
var parentTopic = parent[index];
|
var parentTopic = parent[index];
|
||||||
if (parentTopic != null) {
|
if (parentTopic != null) {
|
||||||
commandContext.connect(topic, parentTopic);
|
commandContext.connect(topic, parentTopic);
|
||||||
|
topic.setOnFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
this._deletedRelModel.forEach(function (model) {
|
this._deletedRelModel.forEach(function (model) {
|
||||||
commandContext.addRelationship(model);
|
commandContext.addRelationship(model);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
Loading…
Reference in New Issue
Block a user