Skip to content

Commit 24341ef

Browse files
author
Boris Sekachev
authored
Merge pull request #2506 from openvinotoolkit/bs/disabled_position_editing_aam
Disabled ability to edit positions in attribute annotation mode
2 parents 004cb64 + 59cff7b commit 24341ef

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3939
- Projects view layout fix (<https://github.com/openvinotoolkit/cvat/pull/2503>)
4040
- Fixed the tasks view (infinite loading) when it is impossible to get a preview of the task (<https://github.com/openvinotoolkit/cvat/pull/2504>)
4141
- Empty frames navigation (<https://github.com/openvinotoolkit/cvat/pull/2505>)
42+
- Disabled position editing in AAM (<https://github.com/openvinotoolkit/cvat/pull/2506>)
4243

4344
### Security
4445

cvat-canvas/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cvat-canvas/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cvat-canvas",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
55
"main": "src/canvas.ts",
66
"scripts": {

cvat-canvas/src/typescript/canvasView.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1342,8 +1342,7 @@ export class CanvasViewImpl implements CanvasView, Listener {
13421342
}
13431343
this.mode = Mode.IDLE;
13441344
this.canvas.style.cursor = '';
1345-
}
1346-
else if (reason === UpdateReasons.DATA_FAILED) {
1345+
} else if (reason === UpdateReasons.DATA_FAILED) {
13471346
const event: CustomEvent = new CustomEvent('canvas.error', {
13481347
detail: {
13491348
exception: model.exception,

cvat-ui/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cvat-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cvat-ui",
3-
"version": "1.11.0",
3+
"version": "1.11.1",
44
"description": "CVAT single-page application",
55
"main": "src/index.tsx",
66
"scripts": {

cvat-ui/src/components/annotation-page/canvas/canvas-wrapper.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default class CanvasWrapperComponent extends React.PureComponent<Props> {
109109
autoborders: automaticBordering,
110110
undefinedAttrValue: consts.UNDEFINED_ATTRIBUTE_VALUE,
111111
displayAllText: showObjectsTextAlways,
112-
forceDisableEditing: workspace === Workspace.REVIEW_WORKSPACE,
112+
forceDisableEditing: [Workspace.ATTRIBUTE_ANNOTATION, Workspace.REVIEW_WORKSPACE].includes(workspace),
113113
});
114114

115115
this.initialSetup();
@@ -260,11 +260,11 @@ export default class CanvasWrapperComponent extends React.PureComponent<Props> {
260260
}
261261

262262
if (prevProps.workspace !== workspace) {
263-
if (workspace === Workspace.REVIEW_WORKSPACE) {
263+
if ([Workspace.ATTRIBUTE_ANNOTATION, Workspace.REVIEW_WORKSPACE].includes(workspace)) {
264264
canvasInstance.configure({
265265
forceDisableEditing: true,
266266
});
267-
} else if (prevProps.workspace === Workspace.REVIEW_WORKSPACE) {
267+
} else if ([Workspace.ATTRIBUTE_ANNOTATION, Workspace.REVIEW_WORKSPACE].includes(prevProps.workspace)) {
268268
canvasInstance.configure({
269269
forceDisableEditing: false,
270270
});

0 commit comments

Comments
 (0)