mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2025-02-18 05:48:14 +01:00
Fix issue when a node is reverted ...
This commit is contained in:
parent
82dc1fc3d4
commit
f3a13dfe7a
@ -41,7 +41,7 @@ mindplot.commands.DeleteCommand = new Class({
|
|||||||
while (relationships.length > 0) {
|
while (relationships.length > 0) {
|
||||||
var relationship = relationships[0];
|
var relationship = relationships[0];
|
||||||
|
|
||||||
this._deletedRelModel.push(relationship);
|
this._deletedRelModel.push(relationship.getModel().clone());
|
||||||
commandContext.deleteRelationship(relationship);
|
commandContext.deleteRelationship(relationship);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,6 +87,7 @@ mindplot.commands.DeleteCommand = new Class({
|
|||||||
|
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
this._deletedRelModel.forEach(function (model) {
|
this._deletedRelModel.forEach(function (model) {
|
||||||
commandContext.addRelationship(model);
|
commandContext.addRelationship(model);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
mindplot.commands.MoveControlPointCommand = new Class({
|
mindplot.commands.MoveControlPointCommand = new Class({
|
||||||
Extends:mindplot.Command,
|
Extends:mindplot.Command,
|
||||||
initialize: function(ctrlPointController, point) {
|
initialize:function (ctrlPointController, point) {
|
||||||
$assert(ctrlPointController, 'line can not be null');
|
$assert(ctrlPointController, 'line can not be null');
|
||||||
$assert($defined(point), 'point can not be null');
|
$assert($defined(point), 'point can not be null');
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ mindplot.commands.MoveControlPointCommand = new Class({
|
|||||||
this._point = point;
|
this._point = point;
|
||||||
},
|
},
|
||||||
|
|
||||||
execute: function(commandContext) {
|
execute:function (commandContext) {
|
||||||
var model = this._line.getModel();
|
var model = this._line.getModel();
|
||||||
switch (this._point) {
|
switch (this._point) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -64,7 +64,7 @@ mindplot.commands.MoveControlPointCommand = new Class({
|
|||||||
this._line.getLine().updateLine(this._point);
|
this._line.getLine().updateLine(this._point);
|
||||||
},
|
},
|
||||||
|
|
||||||
undoExecute: function(commandContext) {
|
undoExecute:function (commandContext) {
|
||||||
var line = this._line;
|
var line = this._line;
|
||||||
var model = line.getModel();
|
var model = line.getModel();
|
||||||
switch (this._point) {
|
switch (this._point) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user