Fixed: Issue with point region doesn't work in Firefox (#2727)

* Fixed: Issue with point region doesn't work in Firefox

* Updated changelog & version

* Fixed license header
main
Boris Sekachev 5 years ago committed by GitHub
parent b279824ce1
commit 789d6dd1eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -32,8 +32,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed filters select overflow (<https://github.com/openvinotoolkit/cvat/pull/2614>)
- Fixed tasks in project autoannotation (<https://github.com/openvinotoolkit/cvat/pull/2725>)
- Cuboids are missed in annotations statistics (<https://github.com/openvinotoolkit/cvat/pull/2704>)
- The list of files attached to the task is not displayed (<https://github.com/openvinotoolkit/cvat/pull/2706>)
- 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>)
### Security

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

@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.2.1",
"version": "2.2.2",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {

@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@ -66,7 +66,7 @@ export class RegionSelectorImpl implements RegionSelector {
'stroke-width': consts.BASE_STROKE_WIDTH / this.geometry.scale,
})
.addClass('cvat_canvas_shape_region_selection');
this.selectionRect.attr({ ...this.startSelectionPoint });
this.selectionRect.attr({ ...this.startSelectionPoint, width: 1, height: 1 });
}
};
@ -78,7 +78,7 @@ export class RegionSelectorImpl implements RegionSelector {
} = this.selectionRect.bbox();
this.selectionRect.remove();
this.selectionRect = null;
if (w === 0 && h === 0) {
if (w <= 1 && h <= 1) {
this.onRegionSelected([x - offset, y - offset]);
} else {
this.onRegionSelected([x - offset, y - offset, x2 - offset, y2 - offset]);

Loading…
Cancel
Save