import { IContainerModel } from '../../../Interfaces/IContainerModel'; import { ISymbolModel } from '../../../Interfaces/ISymbolModel'; 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 = RestoreX(container.properties.x, container.properties.width, container.properties.xPositionReference); const [x] = ApplyParentTransform(container.parent, container.properties.x, 0); container.properties.x = x; return container; }