diff --git a/CHANGELOG.md b/CHANGELOG.md index 3da1ccdcc19e..e7b08362d5e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The list of files attached to the task is not displayed () - Issue with point region doesn't work in Firefox () +- Fixed cuboid perpective change () ### Security diff --git a/cvat-canvas/package-lock.json b/cvat-canvas/package-lock.json index 60d73aca56c3..48b5ea18383c 100644 --- a/cvat-canvas/package-lock.json +++ b/cvat-canvas/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-canvas", - "version": "2.3.0", + "version": "2.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-canvas/package.json b/cvat-canvas/package.json index 15847b5d04c9..aace7d6b4745 100644 --- a/cvat-canvas/package.json +++ b/cvat-canvas/package.json @@ -1,6 +1,6 @@ { "name": "cvat-canvas", - "version": "2.3.0", + "version": "2.3.1", "description": "Part of Computer Vision Annotation Tool which presents its canvas library", "main": "src/canvas.ts", "scripts": { diff --git a/cvat-canvas/src/typescript/svg.patch.ts b/cvat-canvas/src/typescript/svg.patch.ts index d27286309626..de863194406c 100644 --- a/cvat-canvas/src/typescript/svg.patch.ts +++ b/cvat-canvas/src/typescript/svg.patch.ts @@ -167,7 +167,12 @@ SVG.Element.prototype.resize = function constructor(...args: any): any { handler = this.remember('_resizeHandler'); handler.resize = function (e: any) { const { event } = e.detail; - if (event.button === 0 && !event.shiftKey && !event.altKey) { + if ( + event.button === 0 && + // ignore shift key for cuboid change perspective + (!event.shiftKey || this.el.parent().hasClass('cvat_canvas_shape_cuboid')) && + !event.altKey + ) { return handler.constructor.prototype.resize.call(this, e); } }; @@ -233,6 +238,7 @@ function getTopDown(edgeIndex: EdgeIndex): number[] { this.hideProjections(); this._attr('points', points); + this.addClass('cvat_canvas_shape_cuboid'); return this; },