diff --git a/CHANGELOG.md b/CHANGELOG.md index bd171feccfc1..38c47f48e9b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Sidebar in AAM has no hide/show button () - Task/Job buttons has no "Open in new tab" option () - Delete point context menu option has no shortcut hint () +- Fixed issue with unnecessary tag activation in cvat-canvas () ### Security - diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 1106d159acb0..f86793726901 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.1.2", + "version": "1.1.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index baf227c21c92..721932377cf1 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.1.2", + "version": "1.1.3", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx index bbf15c62e9cb..da29325158e0 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx @@ -562,16 +562,18 @@ export default class CanvasWrapperComponent extends React.PureComponent { } = this.props; if (activatedStateID !== null) { + const [activatedState] = annotations + .filter((state: any): boolean => state.clientID === activatedStateID); if (workspace === Workspace.ATTRIBUTE_ANNOTATION) { - const [activatedState] = annotations - .filter((state: any): boolean => state.clientID === activatedStateID); if (activatedState.objectType !== ObjectType.TAG) { canvasInstance.focus(activatedStateID, aamZoomMargin); } else { canvasInstance.fit(); } } - canvasInstance.activate(activatedStateID, activatedAttributeID); + if (activatedState.objectType !== ObjectType.TAG) { + canvasInstance.activate(activatedStateID, activatedAttributeID); + } const el = window.document.getElementById(`cvat_canvas_shape_${activatedStateID}`); if (el) { (el as any as SVGElement).setAttribute('fill-opacity', `${selectedOpacity / 100}`);