diff --git a/CHANGELOG.md b/CHANGELOG.md index 739b782a6c9f..b4540d5bf7c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,12 +33,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Image scaling when moving between images with different resolution () - Invalid completed job count reporting () - OpenVINO-based Nuclio functions can now be deployed to Kubernetes - (). + () +- Adjusted skeleton size checking after drawing () - HRNet CPU serverless function () - Sending empty list of events () + ### Security - TDB diff --git a/cvat-canvas/package.json b/cvat-canvas/package.json index f915be5ac810..20c28f199d41 100644 --- a/cvat-canvas/package.json +++ b/cvat-canvas/package.json @@ -1,6 +1,6 @@ { "name": "cvat-canvas", - "version": "2.16.5", + "version": "2.16.6", "description": "Part of Computer Vision Annotation Tool which presents its canvas library", "main": "src/canvas.ts", "scripts": { diff --git a/cvat-canvas/src/typescript/drawHandler.ts b/cvat-canvas/src/typescript/drawHandler.ts index 60ca0c486913..e7be83b9a35a 100644 --- a/cvat-canvas/src/typescript/drawHandler.ts +++ b/cvat-canvas/src/typescript/drawHandler.ts @@ -72,6 +72,11 @@ function checkConstraint(shapeType: string, points: number[], box: Box | null = (points.length === 2 * 2 && (points[2] - points[0]) * (points[3] - points[1]) >= consts.AREA_THRESHOLD); } + if (shapeType === 'skeleton') { + const [xtl, ytl, xbr, ybr] = points; + return (xbr - xtl >= 1 || ybr - ytl >= 1); + } + return false; } @@ -762,7 +767,7 @@ export class DrawHandlerImpl implements DrawHandler { this.release(); if (this.canceled) return; - if (checkConstraint('rectangle', [xtl, ytl, xbr, ybr])) { + if (checkConstraint('skeleton', [xtl, ytl, xbr, ybr])) { this.onDrawDone({ clientID, shapeType,