From 84f968a872908bde3fa0163c05b88ea4152d1502 Mon Sep 17 00:00:00 2001 From: Eric NGUYEN Date: Tue, 4 Oct 2022 16:00:27 +0200 Subject: [PATCH] TRULY Fix symbol position on scale --- src/Components/SVG/Elements/Symbol.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Components/SVG/Elements/Symbol.tsx b/src/Components/SVG/Elements/Symbol.tsx index 437d74e..09a19f9 100644 --- a/src/Components/SVG/Elements/Symbol.tsx +++ b/src/Components/SVG/Elements/Symbol.tsx @@ -33,12 +33,12 @@ export function Symbol(props: ISymbolProps): JSX.Element { preserveAspectRatio="none" style={{ fill: 'none', - transform: `scale(${1 / props.scale}) translateX(-50%) translateY(-100%)`, + transform: 'translateY(-100%) translateX(-50%)', transformBox: 'fill-box' }} - x={props.model.x} - y={-SYMBOL_MARGIN / props.scale} - height={props.model.height} - width={props.model.width} /> + x={props.model.x + props.model.width / 2} + y={-SYMBOL_MARGIN} + height={props.model.height / props.scale} + width={props.model.width / props.scale} /> ); }