Skip to content

Commit

Permalink
Use match.floor instead of match.round to display size
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Feb 5, 2025
1 parent e606511 commit ca5f6a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cvat-canvas/src/typescript/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit ca5f6a1

Please sign in to comment.