Skip to content

Commit

Permalink
Merge pull request #1377 from opencv/bs/invisible_fix
Browse files Browse the repository at this point in the history
React UI: Fixed points visibility when go between frames
  • Loading branch information
ActiveChooN authored Apr 8, 2020
2 parents b94a949 + b4a91f8 commit e84f482
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -969,9 +969,9 @@ export class CanvasViewImpl implements CanvasView, Listener {
const drawnState = this.drawnStates[clientID];
const shape = this.svgShapes[state.clientID];
const text = this.svgTexts[state.clientID];
const isInvisible = state.hidden || state.outside;

if (drawnState.hidden !== state.hidden || drawnState.outside !== state.outside) {
const isInvisible = state.hidden || state.outside;
if (isInvisible) {
(state.shapeType === 'points' ? shape.remember('_selectHandler').nested : shape)
.style('display', 'none');
Expand Down Expand Up @@ -1041,7 +1041,7 @@ export class CanvasViewImpl implements CanvasView, Listener {
(shape as any).clear();
shape.attr('points', stringified);

if (state.shapeType === 'points' && !state.hidden) {
if (state.shapeType === 'points' && !isInvisible) {
this.selectize(false, shape);
this.setupPoints(shape as SVG.PolyLine, state);
}
Expand Down

0 comments on commit e84f482

Please sign in to comment.