Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Jan 14, 2022
1 parent 515b45e commit bdfb709
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2014,8 +2014,6 @@ export class CanvasViewImpl implements CanvasView, Listener {
shapeSizeElement.rm();
shapeSizeElement = null;
}
// disable internal resize events of SVG.js
window.dispatchEvent(new MouseEvent('mouseup'));
this.mode = Mode.IDLE;
};

Expand All @@ -2032,7 +2030,11 @@ export class CanvasViewImpl implements CanvasView, Listener {
if (state.shapeType === 'rectangle') {
shapeSizeElement = displayShapeSize(this.adoptedContent, this.adoptedText);
}
(shape as any).on('remove.resize', resizeFinally);
(shape as any).on('remove.resize', () => {
// disable internal resize events of SVG.js
window.dispatchEvent(new MouseEvent('mouseup'));
resizeFinally();
});
})
.on('resizing', (): void => {
resized = true;
Expand Down

0 comments on commit bdfb709

Please sign in to comment.