From 80a07e593e10dd91087df02e6aceb39adf2f6208 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 2 Apr 2020 13:45:03 +0300 Subject: [PATCH] Do not show invisible objects on bitmap --- cvat-canvas/src/typescript/canvasView.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cvat-canvas/src/typescript/canvasView.ts b/cvat-canvas/src/typescript/canvasView.ts index 280aac83..57370e50 100644 --- a/cvat-canvas/src/typescript/canvasView.ts +++ b/cvat-canvas/src/typescript/canvasView.ts @@ -916,6 +916,7 @@ export class CanvasViewImpl implements CanvasView, Listener { ctx.fillStyle = 'black'; ctx.fillRect(0, 0, width, height); for (const state of states) { + if (state.hidden || state.outside) continue; ctx.fillStyle = 'white'; if (['rectangle', 'polygon'].includes(state.shapeType)) { const points = state.shapeType === 'rectangle' ? [