Fixed cuboid perspective change (#2733)

* Fixed cuboid perspective change

* Added CHANGELOG and npm version increased
main
Dmitry Kalinin 5 years ago committed by GitHub
parent 967b8c5076
commit 77acd7d3fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 (<https://github.com/openvinotoolkit/cvat/pul
- A couple of css-related issues (top bar disappear, wrong arrow position on collapse elements) (<https://github.com/openvinotoolkit/cvat/pull/2736>)
- Issue with point region doesn't work in Firefox (<https://github.com/openvinotoolkit/cvat/pull/2727>)
- Fixed cuboid perpective change (<https://github.com/openvinotoolkit/cvat/pull/2733>)
### Security

@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.3.0",
"version": "2.3.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -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": {

@ -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;
},

Loading…
Cancel
Save