[CVAT-UI] Fixed displaying on canvas in some cases (#1834)

* Fixed displaying on canvas in some cases

* Updated changelog
main
Boris Sekachev 6 years ago committed by GitHub
parent 757f0ade17
commit 18f6b2f95d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 (<https://github.com/opencv/cvat/pull/1834>)
### Security
-

@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "1.2.1",
"version": "1.2.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -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": {

@ -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(

Loading…
Cancel
Save