diff --git a/cvat-ui/src/components/annotation-page/appearance-block.tsx b/cvat-ui/src/components/annotation-page/appearance-block.tsx index 4ba3e749..73309cbe 100644 --- a/cvat-ui/src/components/annotation-page/appearance-block.tsx +++ b/cvat-ui/src/components/annotation-page/appearance-block.tsx @@ -68,7 +68,9 @@ function mapStateToProps(state: CombinedState): StateToProps { const { annotation: { appearanceCollapsed }, settings: { - shapes: { colorBy, opacity, selectedOpacity, outlined, outlineColor, showBitmap, showProjections }, + shapes: { + colorBy, opacity, selectedOpacity, outlined, outlineColor, showBitmap, showProjections, + }, }, } = state; @@ -153,16 +155,33 @@ function AppearanceBlock(props: Props): JSX.Element { Appearance} key='appearance'>
Color by - + {ColorBy.LABEL} {ColorBy.INSTANCE} {ColorBy.GROUP} Opacity - + Selected opacity - + { changeShapesOutlinedBorders(event.target.checked, outlineColor); }} @@ -175,15 +194,23 @@ function AppearanceBlock(props: Props): JSX.Element { placement='top' resetVisible={false} > - - + Show bitmap - + Show projections
diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/color-picker.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/color-picker.tsx index ae3c1382..c12d4450 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/color-picker.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/color-picker.tsx @@ -22,23 +22,24 @@ interface Props { onChange?: (value: string) => void; onVisibleChange?: (visible: boolean) => void; placement?: - | 'left' - | 'top' - | 'right' - | 'bottom' - | 'topLeft' - | 'topRight' - | 'bottomLeft' - | 'bottomRight' - | 'leftTop' - | 'leftBottom' - | 'rightTop' - | 'rightBottom' - | undefined; + | 'left' + | 'top' + | 'right' + | 'bottom' + | 'topLeft' + | 'topRight' + | 'bottomLeft' + | 'bottomRight' + | 'leftTop' + | 'leftBottom' + | 'rightTop' + | 'rightBottom'; } function ColorPicker(props: Props, ref: React.Ref): JSX.Element { - const { children, value, visible, resetVisible, onChange, onVisibleChange, placement } = props; + const { + children, value, visible, resetVisible, onChange, onVisibleChange, placement, + } = props; const [colorState, setColorState] = useState(value); const [pickerVisible, setPickerVisible] = useState(false); @@ -55,7 +56,7 @@ function ColorPicker(props: Props, ref: React.Ref): JSX.Element { return ( ): JSX.Element { - } - title={ + )} + title={( Select color @@ -118,7 +119,7 @@ function ColorPicker(props: Props, ref: React.Ref): JSX.Element { - } + )} placement={placement || 'left'} overlayClassName='cvat-label-color-picker' trigger='click' diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/label-item.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/label-item.tsx index 73a0c4f3..33a17a02 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/label-item.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/label-item.tsx @@ -33,6 +33,17 @@ function LabelItemComponent(props: Props): JSX.Element { unlockStates, } = props; + const classes = { + lock: { + enabled: { className: 'cvat-label-item-button-lock cvat-label-item-button-lock-enabled' }, + disabled: { className: 'cvat-label-item-button-lock' }, + }, + hidden: { + enabled: { className: 'cvat-label-item-button-hidden cvat-label-item-button-hidden-enabled' }, + disabled: { className: 'cvat-label-item-button-hidden' }, + }, + }; + return ( {statesLocked ? ( - + ) : ( - + )} {statesHidden ? ( - + ) : ( - + )}