diff --git a/cvat-ui/src/assets/reset-perspective.svg b/cvat-ui/src/assets/reset-perspective.svg new file mode 100644 index 00000000..2c7c0b83 --- /dev/null +++ b/cvat-ui/src/assets/reset-perspective.svg @@ -0,0 +1,4 @@ + + + + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item.tsx index 1a5b54cb..88a4b83f 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item.tsx @@ -29,6 +29,7 @@ import { NextIcon, BackgroundIcon, ForegroundIcon, + ResetPerspectiveIcon, } from 'icons'; import { ObjectType, ShapeType } from 'reducers/interfaces'; import { clamp } from 'utils/math'; @@ -38,6 +39,7 @@ function ItemMenu( serverID: number | undefined, locked: boolean, objectType: ObjectType, + shapeType: ShapeType, copyShortcut: string, pasteShortcut: string, propagateShortcut: string, @@ -50,6 +52,8 @@ function ItemMenu( createURL: (() => void), toBackground: (() => void), toForeground: (() => void), + switchCuboidOrientation: (() => void), + resetCuboidPerspective: (() => void), ): JSX.Element { return ( @@ -72,7 +76,22 @@ function ItemMenu( - { objectType !== ObjectType.TAG && ( + {shapeType === ShapeType.CUBOID && ( + + + + )} + {shapeType === ShapeType.CUBOID && ( + + + + )} + {objectType !== ObjectType.TAG && (