diff --git a/CHANGELOG.md b/CHANGELOG.md index e81da5a7..a9cdc225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Projects view layout fix () - Fixed the tasks view (infinite loading) when it is impossible to get a preview of the task () - Empty frames navigation () +- Disabled position editing in AAM () +- TypeError: Cannot read property 'toString' of undefined () ### Security diff --git a/cvat-canvas/package-lock.json b/cvat-canvas/package-lock.json index cffc743f..e13c0da1 100644 --- a/cvat-canvas/package-lock.json +++ b/cvat-canvas/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-canvas", - "version": "2.2.0", + "version": "2.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-canvas/package.json b/cvat-canvas/package.json index 1c7f9bc7..0fb63b61 100644 --- a/cvat-canvas/package.json +++ b/cvat-canvas/package.json @@ -1,6 +1,6 @@ { "name": "cvat-canvas", - "version": "2.2.0", + "version": "2.2.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/canvasView.ts b/cvat-canvas/src/typescript/canvasView.ts index ddec7d15..d4304f22 100644 --- a/cvat-canvas/src/typescript/canvasView.ts +++ b/cvat-canvas/src/typescript/canvasView.ts @@ -1342,8 +1342,7 @@ export class CanvasViewImpl implements CanvasView, Listener { } this.mode = Mode.IDLE; this.canvas.style.cursor = ''; - } - else if (reason === UpdateReasons.DATA_FAILED) { + } else if (reason === UpdateReasons.DATA_FAILED) { const event: CustomEvent = new CustomEvent('canvas.error', { detail: { exception: model.exception, diff --git a/cvat-ui/src/actions/annotation-actions.ts b/cvat-ui/src/actions/annotation-actions.ts index 8f486e96..1d98243e 100644 --- a/cvat-ui/src/actions/annotation-actions.ts +++ b/cvat-ui/src/actions/annotation-actions.ts @@ -520,13 +520,13 @@ export function removeObjectAsync(sessionInstance: any, objectState: any, force: }, }); } else { - throw new Error('Could not remove the object. Is it locked?'); + throw new Error('Could not remove the locked object'); } } catch (error) { dispatch({ type: AnnotationActionTypes.REMOVE_OBJECT_FAILED, payload: { - objectState, + error, }, }); } diff --git a/cvat-ui/src/components/annotation-page/canvas/canvas-wrapper.tsx b/cvat-ui/src/components/annotation-page/canvas/canvas-wrapper.tsx index 20007713..d96ebf14 100644 --- a/cvat-ui/src/components/annotation-page/canvas/canvas-wrapper.tsx +++ b/cvat-ui/src/components/annotation-page/canvas/canvas-wrapper.tsx @@ -109,7 +109,7 @@ export default class CanvasWrapperComponent extends React.PureComponent { autoborders: automaticBordering, undefinedAttrValue: consts.UNDEFINED_ATTRIBUTE_VALUE, displayAllText: showObjectsTextAlways, - forceDisableEditing: workspace === Workspace.REVIEW_WORKSPACE, + forceDisableEditing: [Workspace.ATTRIBUTE_ANNOTATION, Workspace.REVIEW_WORKSPACE].includes(workspace), }); this.initialSetup(); @@ -260,11 +260,11 @@ export default class CanvasWrapperComponent extends React.PureComponent { } if (prevProps.workspace !== workspace) { - if (workspace === Workspace.REVIEW_WORKSPACE) { + if ([Workspace.ATTRIBUTE_ANNOTATION, Workspace.REVIEW_WORKSPACE].includes(workspace)) { canvasInstance.configure({ forceDisableEditing: true, }); - } else if (prevProps.workspace === Workspace.REVIEW_WORKSPACE) { + } else if ([Workspace.ATTRIBUTE_ANNOTATION, Workspace.REVIEW_WORKSPACE].includes(prevProps.workspace)) { canvasInstance.configure({ forceDisableEditing: false, });