Skip to content

Commit

Permalink
Improved comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed May 20, 2024
1 parent af75bda commit c1ce186
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cvat-canvas/src/typescript/masksHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,13 @@ export class MasksHandlerImpl implements MasksHandler {
image.globalCompositeOperation = 'xor';
image.opacity = 0.5;
this.canvas.add(image);
// When paste a mask, we do not need additional logic implemented
// in MasksHandlerImpl::createDrawnObjectsArray.push
// because we will not work with any drawing tools here, and it will cause the issue
// because this.tools may be undefined here when it is used inside the push logic
/*
when we paste a mask, we do not need additional logic implemented
in MasksHandlerImpl::createDrawnObjectsArray.push using JS Proxy
because we will not work with any drawing tools here, and it will cause the issue
because this.tools may be undefined here
when it is used inside the push custom implementation
*/
this.drawnObjects = [image];
this.canvas.renderAll();
} finally {
Expand Down

0 comments on commit c1ce186

Please sign in to comment.