diff --git a/changelog.d/20240625_173129_klakhov_fix_points_color.md b/changelog.d/20240625_173129_klakhov_fix_points_color.md new file mode 100644 index 000000000000..a0d01a7cd281 --- /dev/null +++ b/changelog.d/20240625_173129_klakhov_fix_points_color.md @@ -0,0 +1,4 @@ +### Fixed + +- Points shape color wasn't changed on changing label + () diff --git a/cvat-canvas/package.json b/cvat-canvas/package.json index b261788c47d0..70e8f8a0cc2d 100644 --- a/cvat-canvas/package.json +++ b/cvat-canvas/package.json @@ -1,6 +1,6 @@ { "name": "cvat-canvas", - "version": "2.20.4", + "version": "2.20.5", "type": "module", "description": "Part of Computer Vision Annotation Tool which presents its canvas library", "main": "src/canvas.ts", diff --git a/cvat-canvas/src/typescript/canvasView.ts b/cvat-canvas/src/typescript/canvasView.ts index 111bcf9da0b2..f8004df5a238 100644 --- a/cvat-canvas/src/typescript/canvasView.ts +++ b/cvat-canvas/src/typescript/canvasView.ts @@ -2423,6 +2423,10 @@ export class CanvasViewImpl implements CanvasView, Listener { this.deleteObjects([this.drawnStates[+clientID]]); this.addObjects([state]); continue; + } else if (state.shapeType === 'points') { + const colorization = { ...this.getShapeColorization(state) }; + shape.remember('_selectHandler').nested.attr(colorization); + shape.attr(colorization); } else { shape.attr({ ...this.getShapeColorization(state) }); }