From da82f4f0d6b3c14b7dc0c1c545474279d6ea4bde Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Fri, 14 Jan 2022 17:28:27 +0300 Subject: [PATCH] =?UTF-8?q?Fixed=20issue:=20Uncaught=20TypeError:=20this.e?= =?UTF-8?q?l.node.getScreenCTM()=20is=20null=20=E2=80=A6=20(#4175)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed issue: Uncaught TypeError: this.el.node.getScreenCTM() is null in Firefox * Updated version and changelog * Fixed test --- CHANGELOG.md | 1 + cvat-canvas/package-lock.json | 4 ++-- cvat-canvas/package.json | 2 +- cvat-canvas/src/typescript/canvasView.ts | 8 +++++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b4fb4ad..9f8eb6cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Order in an annotation file() - Fixed task data upload progressbar () - Email in org invitations is case sensitive () +- Uncaught TypeError: this.el.node.getScreenCTM() is null in Firefox () - Bug: canvas is busy when start playing, start resizing a shape and do not release the mouse cursor () - Fixed tus upload error over https () diff --git a/cvat-canvas/package-lock.json b/cvat-canvas/package-lock.json index 228a9110..2b4aaa0d 100644 --- a/cvat-canvas/package-lock.json +++ b/cvat-canvas/package-lock.json @@ -1,12 +1,12 @@ { "name": "cvat-canvas", - "version": "2.12.1", + "version": "2.12.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cvat-canvas", - "version": "2.12.1", + "version": "2.12.2", "license": "MIT", "dependencies": { "@types/polylabel": "^1.0.5", diff --git a/cvat-canvas/package.json b/cvat-canvas/package.json index 7e4ce64f..c348438b 100644 --- a/cvat-canvas/package.json +++ b/cvat-canvas/package.json @@ -1,6 +1,6 @@ { "name": "cvat-canvas", - "version": "2.12.1", + "version": "2.12.2", "description": "Part of Computer Vision Annotation Tool which presents its canvas library", "main": "src/canvas.ts", "scripts": { diff --git a/cvat-canvas/src/typescript/canvasView.ts b/cvat-canvas/src/typescript/canvasView.ts index 1d9cf9e8..4da2e35a 100644 --- a/cvat-canvas/src/typescript/canvasView.ts +++ b/cvat-canvas/src/typescript/canvasView.ts @@ -1947,6 +1947,8 @@ export class CanvasViewImpl implements CanvasView, Listener { hideText(); (shape as any).on('remove.drag', (): void => { this.mode = Mode.IDLE; + // disable internal drag events of SVG.js + window.dispatchEvent(new MouseEvent('mouseup')); }); }) .on('dragend', (e: CustomEvent): void => { @@ -2028,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;