From ca5f6a1919c9d52528de2d58ad75c9b232cec112 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 5 Feb 2025 15:56:10 +0200 Subject: [PATCH] Use match.floor instead of match.round to display size --- cvat-canvas/src/typescript/shared.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvat-canvas/src/typescript/shared.ts b/cvat-canvas/src/typescript/shared.ts index 9e210067e7d7..bde8cdbb8671 100644 --- a/cvat-canvas/src/typescript/shared.ts +++ b/cvat-canvas/src/typescript/shared.ts @@ -100,7 +100,7 @@ export function displayShapeSize(shapesContainer: SVG.Container, textContainer: .fill('white') .addClass('cvat_canvas_text'), update(shape: SVG.Shape): void { - let text = `${Math.round(shape.width())}x${Math.round(shape.height())}px`; + let text = `${Math.floor(shape.width())}x${Math.floor(shape.height())}px`; if (shape.type === 'rect' || shape.type === 'ellipse') { let rotation = shape.transform().rotation || 0; // be sure, that rotation in range [0; 360]