Set dimension to fixed 2

This commit is contained in:
Eric NGUYEN 2022-08-30 17:45:00 +02:00
parent ee7c418b24
commit 5aaf1f4745
3 changed files with 11 additions and 5 deletions

View file

@ -70,7 +70,9 @@ function AddNewDimension(currentDepth: number, min: number, max: number, lastY:
const y = lastY + (DIMENSION_MARGIN * (currentDepth + 1));
const strokeWidth = 1;
const width = xEnd - xStart;
const text = width.toString();
const text = width
.toFixed(2)
.toString();
if (width === 0) {
return;