diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cc995a6f94f..76f65521551b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Wrong attribute can be removed in labels editor () - UI fails with the error "Cannot read property 'label' of undefined" () - Exception: "Value must be a user instance" () +- Reset zoom option doesn't work in tag annotation mode () ### Security diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 3e71c1605be2..25cfefe6e62a 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.10.4", + "version": "1.10.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 3fa2ebb62792..acda045f9a23 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.10.4", + "version": "1.10.5", "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 d760411ab66a..acc697ae0990 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 @@ -10,7 +10,9 @@ import Icon from 'antd/lib/icon'; import Layout from 'antd/lib/layout/layout'; import Slider, { SliderValue } from 'antd/lib/slider'; -import { ColorBy, GridColor, ObjectType, ContextMenuType, Workspace, ShapeType } from 'reducers/interfaces'; +import { + ColorBy, GridColor, ObjectType, ContextMenuType, Workspace, ShapeType, +} from 'reducers/interfaces'; import { LogType } from 'cvat-logger'; import { Canvas } from 'cvat-canvas-wrapper'; import getCore from 'cvat-core-wrapper'; @@ -217,10 +219,7 @@ export default class CanvasWrapperComponent extends React.PureComponent { this.updateCanvas(); } - if ( - prevProps.frame !== frameData.number && - ((resetZoom && workspace !== Workspace.ATTRIBUTE_ANNOTATION) || workspace === Workspace.TAG_ANNOTATION) - ) { + if (prevProps.frame !== frameData.number && resetZoom && workspace !== Workspace.ATTRIBUTE_ANNOTATION) { canvasInstance.html().addEventListener( 'canvas.setup', () => { @@ -304,7 +303,9 @@ export default class CanvasWrapperComponent extends React.PureComponent { } private onCanvasShapeDrawn = (event: any): void => { - const { jobInstance, activeLabelID, activeObjectType, frame, onShapeDrawn, onCreateAnnotations } = this.props; + const { + jobInstance, activeLabelID, activeObjectType, frame, onShapeDrawn, onCreateAnnotations, + } = this.props; if (!event.detail.continue) { onShapeDrawn(); @@ -327,7 +328,9 @@ export default class CanvasWrapperComponent extends React.PureComponent { }; private onCanvasObjectsMerged = (event: any): void => { - const { jobInstance, frame, onMergeAnnotations, onMergeObjects } = this.props; + const { + jobInstance, frame, onMergeAnnotations, onMergeObjects, + } = this.props; onMergeObjects(false); @@ -340,7 +343,9 @@ export default class CanvasWrapperComponent extends React.PureComponent { }; private onCanvasObjectsGroupped = (event: any): void => { - const { jobInstance, frame, onGroupAnnotations, onGroupObjects } = this.props; + const { + jobInstance, frame, onGroupAnnotations, onGroupObjects, + } = this.props; onGroupObjects(false); @@ -349,7 +354,9 @@ export default class CanvasWrapperComponent extends React.PureComponent { }; private onCanvasTrackSplitted = (event: any): void => { - const { jobInstance, frame, onSplitAnnotations, onSplitTrack } = this.props; + const { + jobInstance, frame, onSplitAnnotations, onSplitTrack, + } = this.props; onSplitTrack(false); @@ -429,7 +436,9 @@ export default class CanvasWrapperComponent extends React.PureComponent { }; private onCanvasCursorMoved = async (event: any): Promise => { - const { jobInstance, activatedStateID, workspace, onActivateObject } = this.props; + const { + jobInstance, activatedStateID, workspace, onActivateObject, + } = this.props; if (workspace !== Workspace.STANDARD) { return; @@ -560,7 +569,9 @@ export default class CanvasWrapperComponent extends React.PureComponent { } private updateShapesView(): void { - const { annotations, opacity, colorBy, outlined, outlineColor } = this.props; + const { + annotations, opacity, colorBy, outlined, outlineColor, + } = this.props; for (const state of annotations) { let shapeColor = ''; @@ -588,7 +599,9 @@ export default class CanvasWrapperComponent extends React.PureComponent { } private updateCanvas(): void { - const { curZLayer, annotations, frameData, canvasInstance } = this.props; + const { + curZLayer, annotations, frameData, canvasInstance, + } = this.props; if (frameData !== null) { canvasInstance.setup(