[Update] Translation and fix

This commit is contained in:
Carl Fuchs 2023-02-21 15:02:53 +01:00
parent 174767f22c
commit 4c2cf66667
6 changed files with 49 additions and 11 deletions

View file

@ -167,11 +167,11 @@ function Dimensions({ containers, symbols, root, scale }: IDimensionLayerProps):
for (const symbol of symbols) {
if (symbol[1].showDimension) {
startDepthHorizontalSymbols++;
startDepthVerticalSymbols++;
if (symbol[1].isVertical) {
startDepthVerticalSymbols++;
AddVerticalSymbolDimension(symbol[1], dimensions, scale, startDepthVerticalSymbols);
} else {
startDepthHorizontalSymbols++;
AddHorizontalSymbolDimension(symbol[1], dimensions, scale, startDepthHorizontalSymbols);
}
}

View file

@ -37,11 +37,11 @@ export function Symbol(props: ISymbolProps): JSX.Element {
);
}
if (props.model.isVertical) {
x = (-SYMBOL_MARGIN - props.model.height) / props.scale;
x = (-SYMBOL_MARGIN - props.model.width) / props.scale;
y = (props.model.offset + props.model.height / 2) - (props.model.height / props.scale / 2);
} else {
x = (props.model.offset + props.model.width / 2) - (props.model.width / props.scale / 2);
y = (-SYMBOL_MARGIN - props.model.width) / props.scale;
y = (-SYMBOL_MARGIN - props.model.height) / props.scale;
}
return (
<image