From 2bb205ce4a2d06cd4b3875e8f1906d172e5d1653 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 29 Nov 2022 19:08:49 -0800 Subject: [PATCH] Fix by reference object issue on relationship. --- .../src/components/commands/MoveControlPointCommand.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mindplot/src/components/commands/MoveControlPointCommand.ts b/packages/mindplot/src/components/commands/MoveControlPointCommand.ts index cf907c91..48679c75 100644 --- a/packages/mindplot/src/components/commands/MoveControlPointCommand.ts +++ b/packages/mindplot/src/components/commands/MoveControlPointCommand.ts @@ -46,9 +46,10 @@ class MoveControlPointCommand extends Command { const model = relationship.getModel(); this._oldCtrPoint = PivotType.Start === ctrIndex ? model.getSrcCtrlPoint() : model.getDestCtrlPoint(); + this._oldCtrPoint = { ...this._oldCtrPoint }; // New relationship ... - this._newCtrPoint = controlPoints.getControlPointPosition(ctrIndex); + this._newCtrPoint = { ...controlPoints.getControlPointPosition(ctrIndex) }; } execute() {