Fix additional margin not taking into account in the scaling

This commit is contained in:
Eric NGUYEN 2023-02-23 18:17:46 +01:00
parent 63714b3520
commit 6d4938a487

View file

@ -194,7 +194,7 @@ function AddHorizontalSymbolDimension(
const spacing = DIMENSION_MARGIN;
const position = spacing * (depth + 1) / maxDepth;
const offset = SYMBOL_DIMENSION_MARGIN + position / scale;
const offset = (SYMBOL_DIMENSION_MARGIN + position) / scale;
const text = width
.toFixed(0)
.toString();
@ -225,7 +225,7 @@ function AddVerticalSymbolDimension(
const spacing = DIMENSION_MARGIN;
const position = spacing * (depth + 1) / maxDepth;
const offset = SYMBOL_DIMENSION_MARGIN + position / scale;
const offset = (SYMBOL_DIMENSION_MARGIN + position) / scale;
const text = height
.toFixed(0)
.toString();