Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Feb 5, 2025
1 parent 204ea6d commit e606511
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cvat-canvas/src/typescript/drawHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ interface FinalCoordinates {

function checkConstraint(shapeType: string, points: number[], box: Box | null = null): boolean {
if (shapeType === 'rectangle') {
const [width, height] = [box.xbr - box.xtl, box.ybr - box.ytl];
const [xtl, ytl, xbr, ybr] = points;
const [width, height] = [xbr - xtl, ybr - ytl];
return width >= consts.SIZE_THRESHOLD && height >= consts.SIZE_THRESHOLD;
}

Expand Down

0 comments on commit e606511

Please sign in to comment.