main
Dmitry Kalinin 6 years ago
parent c11cc642df
commit 3c128b2a73

@ -370,8 +370,8 @@ export function updateCanvasContextMenu(
visible: boolean,
left: number,
top: number,
pointID: number | null = null,
type?: ContextMenuType,
pointID?: number,
): AnyAction {
return {
type: AnnotationActionTypes.UPDATE_CANVAS_CONTEXT_MENU,

@ -5,14 +5,11 @@
import React from 'react';
import { GlobalHotKeys, KeyMap } from 'react-hotkeys';
import {
Layout,
Slider,
Icon,
Tooltip,
} from 'antd';
import Tooltip from 'antd/lib/tooltip';
import Icon from 'antd/lib/icon';
import Layout from 'antd/lib/layout/layout';
import Slider, { SliderValue } from 'antd/lib/slider';
import { SliderValue } from 'antd/lib/slider';
import {
ColorBy,
GridColor,

@ -119,77 +119,3 @@
margin: 0px 5px;
}
}
.cvat-canvas-context-menu {
opacity: 0.6;
position: fixed;
width: 300px;
z-index: 10;
max-height: 50%;
overflow-y: auto;
&:hover {
opacity: 1;
}
}
.cvat-canvas-point-context-menu {
opacity: 0.6;
position: fixed;
width: 135px;
z-index: 10;
max-height: 50%;
overflow-y: auto;
background-color: #ffffff;
border-radius: 4px;
&:hover {
opacity: 1;
}
}
.cvat-canvas-z-axis-wrapper {
position: absolute;
background: $background-color-2;
bottom: 10px;
right: 10px;
height: 150px;
z-index: 100;
border-radius: 6px;
opacity: 0.5;
border: 1px solid $border-color-3;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 3px;
&:hover {
opacity: 1;
}
> .ant-slider {
height: 75%;
margin: 5px 3px;
> .ant-slider-rail {
background-color: #979797;
}
> .ant-slider-handle {
transform: none !important;
}
}
> i {
opacity: 0.7;
color: $objects-bar-icons-color;
&:hover {
opacity: 1;
}
&:active {
opacity: 0.7;
}
}
}

@ -229,6 +229,21 @@
}
}
.cvat-canvas-point-context-menu {
opacity: 0.6;
position: fixed;
width: 135px;
z-index: 10;
max-height: 50%;
overflow-y: auto;
background-color: #ffffff;
border-radius: 4px;
&:hover {
opacity: 1;
}
}
.cvat-canvas-z-axis-wrapper {
position: absolute;
background: $background-color-2;

@ -13,7 +13,7 @@ import CanvasPointContextMenuComponent from 'components/annotation-page/standard
interface StateToProps {
activatedStateID: number | null;
activatedPointID: number | null | undefined;
activatedPointID: number | null;
states: any[];
visible: boolean;
top: number;
@ -70,15 +70,15 @@ function mapDispatchToProps(dispatch: any): DispatchToProps {
type Props = StateToProps & DispatchToProps;
interface State {
activatedStateID: number | null | undefined;
activatedPointID: number | null | undefined;
activatedStateID: number | null;
activatedPointID: number | null;
latestLeft: number;
latestTop: number;
left: number;
top: number;
}
class CanvasContextMenuContainer extends React.PureComponent<Props, State> {
class CanvasPointContextMenuContainer extends React.PureComponent<Props, State> {
public constructor(props: Props) {
super(props);
@ -190,4 +190,4 @@ class CanvasContextMenuContainer extends React.PureComponent<Props, State> {
export default connect(
mapStateToProps,
mapDispatchToProps,
)(CanvasContextMenuContainer);
)(CanvasPointContextMenuContainer);

@ -260,7 +260,7 @@ function mapDispatchToProps(dispatch: any): DispatchToProps {
},
onUpdateContextMenu(visible: boolean, left: number, top: number,
type: ContextMenuType, pointID?: number): void {
dispatch(updateCanvasContextMenu(visible, left, top, type, pointID));
dispatch(updateCanvasContextMenu(visible, left, top, pointID, type));
},
onAddZLayer(): void {
dispatch(addZLayer());

@ -304,7 +304,7 @@ export interface AnnotationState {
top: number;
left: number;
type: ContextMenuType;
pointID: number | null | undefined;
pointID: number | null;
};
instance: Canvas;
ready: boolean;

Loading…
Cancel
Save