diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c63a6c46f46..a1540a700723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - ### Fixed -- +- Some objects aren't shown on canvas sometimes. For example after propagation on of objects is invisible () ### Security - diff --git a/cvat-canvas/package-lock.json b/cvat-canvas/package-lock.json index 65559bdb8282..c59ddb778db0 100644 --- a/cvat-canvas/package-lock.json +++ b/cvat-canvas/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-canvas", - "version": "1.2.1", + "version": "1.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-canvas/package.json b/cvat-canvas/package.json index a27a4c575cb5..0a2dcbf9c2b7 100644 --- a/cvat-canvas/package.json +++ b/cvat-canvas/package.json @@ -1,6 +1,6 @@ { "name": "cvat-canvas", - "version": "1.2.1", + "version": "1.2.2", "description": "Part of Computer Vision Annotation Tool which presents its canvas library", "main": "src/canvas.ts", "scripts": { diff --git a/cvat-canvas/src/typescript/canvasView.ts b/cvat-canvas/src/typescript/canvasView.ts index 8c3d27fc7887..e1da53d33768 100644 --- a/cvat-canvas/src/typescript/canvasView.ts +++ b/cvat-canvas/src/typescript/canvasView.ts @@ -99,7 +99,7 @@ export class CanvasViewImpl implements CanvasView, Listener { if (value) { if (shape) { (state.shapeType === 'points' ? shape.remember('_selectHandler').nested : shape) - .style('display', 'none'); + .addClass('cvat_canvas_hidden'); } if (text) { @@ -112,7 +112,7 @@ export class CanvasViewImpl implements CanvasView, Listener { if (!state.outside && !state.hidden) { if (shape) { (state.shapeType === 'points' ? shape.remember('_selectHandler').nested : shape) - .style('display', ''); + .removeClass('cvat_canvas_hidden'); } if (text) { @@ -1244,13 +1244,13 @@ export class CanvasViewImpl implements CanvasView, Listener { if (drawnState.hidden !== state.hidden || drawnState.outside !== state.outside) { if (isInvisible) { (state.shapeType === 'points' ? shape.remember('_selectHandler').nested : shape) - .style('display', 'none'); + .addClass('cvat_canvas_hidden'); if (text) { text.addClass('cvat_canvas_hidden'); } } else { (state.shapeType === 'points' ? shape.remember('_selectHandler').nested : shape) - .style('display', ''); + .removeClass('cvat_canvas_hidden'); if (text) { text.removeClass('cvat_canvas_hidden'); this.updateTextPosition(