diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e5152495c16..1e58aa004251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Wrong description on register view for the username field () - Wrong resolution for resizing a shape () - React warning because of not unique keys in labels viewer () +- A couple of exceptions in AAM related with early object activation () ### Security diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index d7d6dc4ddb92..ae7685c57d4c 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.3.1", + "version": "1.3.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index e15f89230fee..e94c9f289b7f 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.3.1", + "version": "1.3.2", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-annotation-sidebar.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-annotation-sidebar.tsx index 1c24f961f16e..75ed16cb9411 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-annotation-sidebar.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-annotation-sidebar.tsx @@ -35,6 +35,7 @@ interface StateToProps { jobInstance: any; keyMap: Record; normalizedKeyMap: Record; + canvasIsReady: boolean; } interface DispatchToProps { @@ -58,6 +59,9 @@ function mapStateToProps(state: CombinedState): StateToProps { instance: jobInstance, labels, }, + canvas: { + ready: canvasIsReady, + }, }, shortcuts: { keyMap, @@ -73,6 +77,7 @@ function mapStateToProps(state: CombinedState): StateToProps { states, keyMap, normalizedKeyMap, + canvasIsReady, }; } @@ -98,6 +103,7 @@ function AttributeAnnotationSidebar(props: StateToProps & DispatchToProps): JSX. activateObject, keyMap, normalizedKeyMap, + canvasIsReady, } = props; const [labelAttrMap, setLabelAttrMap] = useState( @@ -117,14 +123,16 @@ function AttributeAnnotationSidebar(props: StateToProps & DispatchToProps): JSX. ? labelAttrMap[activeObjectState.label.id] : null; - if (activeObjectState) { - const attribute = labelAttrMap[activeObjectState.label.id]; - if (attribute && attribute.id !== activatedAttributeID) { - activateObject(activatedStateID, attribute ? attribute.id : null); + if (canvasIsReady) { + if (activeObjectState) { + const attribute = labelAttrMap[activeObjectState.label.id]; + if (attribute && attribute.id !== activatedAttributeID) { + activateObject(activatedStateID, attribute ? attribute.id : null); + } + } else if (states.length) { + const attribute = labelAttrMap[states[0].label.id]; + activateObject(states[0].clientID, attribute ? attribute.id : null); } - } else if (states.length) { - const attribute = labelAttrMap[states[0].label.id]; - activateObject(states[0].clientID, attribute ? attribute.id : null); } const nextObject = (step: number): void => { 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 df71397ee5d4..6e4b0b2b395b 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 @@ -675,14 +675,12 @@ export default class CanvasWrapperComponent extends React.PureComponent { const { annotations, frameData, - frameAngle, canvasInstance, } = this.props; if (frameData !== null) { canvasInstance.setup(frameData, annotations .filter((e) => e.objectType !== ObjectType.TAG)); - canvasInstance.rotate(frameAngle); } }