TRULY Fix symbol position on scale

This commit is contained in:
Eric NGUYEN 2022-10-04 16:00:27 +02:00
parent 7121f0aae5
commit 84f968a872

View file

@ -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} />
);
}