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

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

Merged
merged 2 commits into from
Jul 2, 2020
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-
Expand Down
2 changes: 1 addition & 1 deletion cvat-canvas/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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": "1.2.1",
"version": "1.2.2",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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(
Expand Down