From 86c34b112ef61e7f4d3921370cd05ed496ed563d Mon Sep 17 00:00:00 2001 From: Eric NGUYEN Date: Tue, 4 Oct 2022 17:55:29 +0200 Subject: [PATCH] Fix big regression with symbols not using PositionReference --- src/Components/Editor/Actions/SymbolOperations.ts | 2 +- src/Components/Editor/Behaviors/SymbolBehaviors.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Editor/Actions/SymbolOperations.ts b/src/Components/Editor/Actions/SymbolOperations.ts index a187e11..5357f81 100644 --- a/src/Components/Editor/Actions/SymbolOperations.ts +++ b/src/Components/Editor/Actions/SymbolOperations.ts @@ -29,7 +29,7 @@ export function AddSymbol( const newSymbols = structuredClone(current.symbols); const newSymbol: ISymbolModel = GetDefaultSymbolModel(name, newCounters, type, symbolConfig); - newSymbol.x = RestoreX(newSymbol.x, newSymbol.width, newSymbol.config.XPositionReference); + newSymbol.x = RestoreX(newSymbol.x, newSymbol.width, newSymbol.config.PositionReference); newSymbols.set(newSymbol.id, newSymbol); diff --git a/src/Components/Editor/Behaviors/SymbolBehaviors.ts b/src/Components/Editor/Behaviors/SymbolBehaviors.ts index b0c58a9..7d6d4af 100644 --- a/src/Components/Editor/Behaviors/SymbolBehaviors.ts +++ b/src/Components/Editor/Behaviors/SymbolBehaviors.ts @@ -4,7 +4,7 @@ import { ApplyParentTransform } from '../../../utils/itertools'; import { RestoreX, TransformX } from '../../../utils/svg'; export function ApplySymbol(container: IContainerModel, symbol: ISymbolModel): IContainerModel { - container.properties.x = TransformX(symbol.x, symbol.width, symbol.config.XPositionReference); + container.properties.x = TransformX(symbol.x, symbol.width, symbol.config.PositionReference); container.properties.x = RestoreX(container.properties.x, container.properties.width, container.properties.positionReference); const [x] = ApplyParentTransform(container.parent, container.properties.x, 0); container.properties.x = x;