Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed changing color of points shape when label is changed #8082

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.d/20240625_173129_klakhov_fix_points_color.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Points shape color wasn't changed on changing label
(<https://github.com/cvat-ai/cvat/pull/8082>)
2 changes: 1 addition & 1 deletion cvat-canvas/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 4 additions & 0 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
klakhov marked this conversation as resolved.
Show resolved Hide resolved
} else {
shape.attr({ ...this.getShapeColorization(state) });
}
Expand Down
Loading