diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx index 4324efbbb556..dbb13d24fe68 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-buttons.tsx @@ -7,7 +7,9 @@ import { Row, Col } from 'antd/lib/grid'; import Icon from 'antd/lib/icon'; import Tooltip from 'antd/lib/tooltip'; -import { ObjectOutsideIcon, FirstIcon, LastIcon, PreviousIcon, NextIcon } from 'icons'; +import { + ObjectOutsideIcon, FirstIcon, LastIcon, PreviousIcon, NextIcon, +} from 'icons'; import { ObjectType, ShapeType } from 'reducers/interfaces'; interface Props { @@ -93,6 +95,37 @@ function ItemButtonsComponent(props: Props): JSX.Element { const hiddenStyle = hiddenDisabled ? { opacity: 0.5, pointerEvents: 'none' as const } : {}; const keyframeStyle = keyframeDisabled ? { opacity: 0.5, pointerEvents: 'none' as const } : {}; + const classes = { + firstKeyFrame: { className: 'cvat-object-item-button-first-keyframe' }, + prevKeyFrame: { className: 'cvat-object-item-button-prev-keyframe' }, + nextKeyFrame: { className: 'cvat-object-item-button-next-keyframe' }, + lastKeyFrame: { className: 'cvat-object-item-button-last-keyframe' }, + outside: { + enabled: { className: 'cvat-object-item-button-outside cvat-object-item-button-outside-enabled' }, + disabled: { className: 'cvat-object-item-button-outside' }, + }, + lock: { + enabled: { className: 'cvat-object-item-button-lock cvat-object-item-button-lock-enabled' }, + disabled: { className: 'cvat-object-item-button-lock' }, + }, + occluded: { + enabled: { className: 'cvat-object-item-button-occluded cvat-object-item-button-occluded-enabled' }, + disabled: { className: 'cvat-object-item-button-occluded' }, + }, + pinned: { + enabled: { className: 'cvat-object-item-button-pinned cvat-object-item-button-pinned-enabled' }, + disabled: { className: 'cvat-object-item-button-pinned' }, + }, + hidden: { + enabled: { className: 'cvat-object-item-button-hidden cvat-object-item-button-hidden-enabled' }, + disabled: { className: 'cvat-object-item-button-hidden' }, + }, + keyframe: { + enabled: { className: 'cvat-object-item-button-keyframe cvat-object-item-button-keyframe-enabled' }, + disabled: { className: 'cvat-object-item-button-keyframe' }, + }, + }; + if (objectType === ObjectType.TRACK) { return ( @@ -100,34 +133,62 @@ function ItemButtonsComponent(props: Props): JSX.Element { {navigateFirstKeyframe ? ( - + ) : ( - + )} {navigatePrevKeyframe ? ( - + ) : ( - + )} {navigateNextKeyframe ? ( - + ) : ( - + )} {navigateLastKeyframe ? ( - + ) : ( - + )} @@ -135,45 +196,72 @@ function ItemButtonsComponent(props: Props): JSX.Element { {outside ? ( - + ) : ( - + )} {locked ? ( - + ) : ( - + )} {occluded ? ( - + ) : ( - + )} {keyframe ? ( - + ) : ( - + )} @@ -181,9 +269,14 @@ function ItemButtonsComponent(props: Props): JSX.Element { {pinned ? ( - + ) : ( - + )} @@ -202,9 +295,9 @@ function ItemButtonsComponent(props: Props): JSX.Element { {locked ? ( - + ) : ( - + )} @@ -221,33 +314,37 @@ function ItemButtonsComponent(props: Props): JSX.Element { {locked ? ( - + ) : ( - + )} {occluded ? ( - + ) : ( - + )} {shapeType !== ShapeType.POINTS && ( {pinned ? ( - + ) : ( - + )}