From 1b0f71963939f04605712505b8a834bba7dc298f Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 23 Nov 2023 11:11:55 +0200 Subject: [PATCH] Fixed drawn marker (#7168) --- changelog.d/20231123_093015_sekachev.bs_fixed_drawn_marker.md | 4 ++++ cvat-canvas/src/typescript/masksHandler.ts | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 changelog.d/20231123_093015_sekachev.bs_fixed_drawn_marker.md diff --git a/changelog.d/20231123_093015_sekachev.bs_fixed_drawn_marker.md b/changelog.d/20231123_093015_sekachev.bs_fixed_drawn_marker.md new file mode 100644 index 000000000000..e37606702321 --- /dev/null +++ b/changelog.d/20231123_093015_sekachev.bs_fixed_drawn_marker.md @@ -0,0 +1,4 @@ +### Fixed + +- Fixed minor issue when brush marker is appended to a final mask + () diff --git a/cvat-canvas/src/typescript/masksHandler.ts b/cvat-canvas/src/typescript/masksHandler.ts index 45d7cdecf17e..0f47a2de8d38 100644 --- a/cvat-canvas/src/typescript/masksHandler.ts +++ b/cvat-canvas/src/typescript/masksHandler.ts @@ -559,6 +559,7 @@ export class MasksHandlerImpl implements MasksHandler { try { if (this.drawnObjects.length) { const wrappingBbox = this.getDrawnObjectsWrappingBox(); + this.removeBrushMarker(); // remove brush marker from final mask const imageData = this.imageDataFromCanvas(wrappingBbox); const rle = zipChannels(imageData); rle.push(wrappingBbox.left, wrappingBbox.top, wrappingBbox.right, wrappingBbox.bottom); @@ -629,6 +630,7 @@ export class MasksHandlerImpl implements MasksHandler { try { if (this.drawnObjects.length) { const wrappingBbox = this.getDrawnObjectsWrappingBox(); + this.removeBrushMarker(); // remove brush marker from final mask const imageData = this.imageDataFromCanvas(wrappingBbox); const rle = zipChannels(imageData); rle.push(wrappingBbox.left, wrappingBbox.top, wrappingBbox.right, wrappingBbox.bottom);