From c0c90745872b7f713deb0de2af84d64fb3b9493d Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 9 Dec 2020 11:40:44 +0300 Subject: [PATCH] Abort PR #2506 by customer request --- CHANGELOG.md | 1 - .../components/annotation-page/canvas/canvas-wrapper.tsx | 6 +++--- .../actions_tasks_objects/issue_2486_not_edit_object_aam.js | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 205b7657..4a7f3b8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,7 +41,6 @@ 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 () - Extra shapes are drawn after Esc, or G pressed while drawing a region in grouping () - Reset state (reviews, issues) after logout or changing a job () 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 d96ebf14..20007713 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.ATTRIBUTE_ANNOTATION, Workspace.REVIEW_WORKSPACE].includes(workspace), + forceDisableEditing: workspace === Workspace.REVIEW_WORKSPACE, }); this.initialSetup(); @@ -260,11 +260,11 @@ export default class CanvasWrapperComponent extends React.PureComponent { } if (prevProps.workspace !== workspace) { - if ([Workspace.ATTRIBUTE_ANNOTATION, Workspace.REVIEW_WORKSPACE].includes(workspace)) { + if (workspace === Workspace.REVIEW_WORKSPACE) { canvasInstance.configure({ forceDisableEditing: true, }); - } else if ([Workspace.ATTRIBUTE_ANNOTATION, Workspace.REVIEW_WORKSPACE].includes(prevProps.workspace)) { + } else if (prevProps.workspace === Workspace.REVIEW_WORKSPACE) { canvasInstance.configure({ forceDisableEditing: false, }); diff --git a/tests/cypress/integration/actions_tasks_objects/issue_2486_not_edit_object_aam.js b/tests/cypress/integration/actions_tasks_objects/issue_2486_not_edit_object_aam.js index ace8fa9a..e2faee99 100644 --- a/tests/cypress/integration/actions_tasks_objects/issue_2486_not_edit_object_aam.js +++ b/tests/cypress/integration/actions_tasks_objects/issue_2486_not_edit_object_aam.js @@ -25,7 +25,7 @@ context("Object can't be draggable/resizable in AAM", () => { }); describe(`Testing issue "${issueId}"`, () => { - it('Create, acttivate a object', () => { + it.skip('Create, acttivate a object', () => { cy.createRectangle(createRectangleShape2Points); cy.get('#cvat_canvas_shape_1') .should('not.have.class', 'cvat_canvas_shape_activated') @@ -33,7 +33,7 @@ context("Object can't be draggable/resizable in AAM", () => { .should('have.class', 'cvat_canvas_shape_activated'); }); - it('Go to AAM', () => { + it.skip('Go to AAM', () => { cy.changeWorkspace('Attribute annotation', labelName); cy.get('#cvat_canvas_shape_1') .then((shape) => { @@ -50,7 +50,7 @@ context("Object can't be draggable/resizable in AAM", () => { }); }); - it('Try to move/resize the object', () => { + it.skip('Try to move/resize the object', () => { cy.get('.cvat-canvas-container') .trigger('mousedown', { button: 0 }) .trigger('mousemove', 550, 251)