Fix big regression with symbols not using PositionReference
This commit is contained in:
parent
1086bf58a1
commit
86c34b112e
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ export function AddSymbol(
|
||||||
|
|
||||||
const newSymbols = structuredClone(current.symbols);
|
const newSymbols = structuredClone(current.symbols);
|
||||||
const newSymbol: ISymbolModel = GetDefaultSymbolModel(name, newCounters, type, symbolConfig);
|
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);
|
newSymbols.set(newSymbol.id, newSymbol);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { ApplyParentTransform } from '../../../utils/itertools';
|
||||||
import { RestoreX, TransformX } from '../../../utils/svg';
|
import { RestoreX, TransformX } from '../../../utils/svg';
|
||||||
|
|
||||||
export function ApplySymbol(container: IContainerModel, symbol: ISymbolModel): IContainerModel {
|
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);
|
container.properties.x = RestoreX(container.properties.x, container.properties.width, container.properties.positionReference);
|
||||||
const [x] = ApplyParentTransform(container.parent, container.properties.x, 0);
|
const [x] = ApplyParentTransform(container.parent, container.properties.x, 0);
|
||||||
container.properties.x = x;
|
container.properties.x = x;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue