-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React UI: Point deletion context menu #1292
Conversation
Hmm..
Can you confirm if it works for you? |
Hmm, everything works fine for me, but i'll try to figure it out. Also found that there is ability to open context menu for box points also. Will fix it. |
@bsekachev please confirm that you still have an issue. And if so can you please provide a case in which it happens? |
Was you able to reproduce it on ubuntu? |
Yes, working on it |
Fixed deleting of the latest point
import { | ||
Layout, | ||
Slider, | ||
Icon, | ||
Tooltip, | ||
} from 'antd'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's import exact components in future code
Not from antd
wrapper
It common recommendation to reduce bundle size
.cvat-canvas-context-menu { | ||
opacity: 0.6; | ||
position: fixed; | ||
width: 300px; | ||
z-index: 10; | ||
max-height: 50%; | ||
overflow-y: auto; | ||
|
||
&:hover { | ||
opacity: 1; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have you duplicated style from src/components/annotation-page/styles.scss
?
.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; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more duplicate
|
||
interface StateToProps { | ||
activatedStateID: number | null; | ||
activatedPointID: number | null | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
activatedPointID?: number | null
|
||
interface State { | ||
activatedStateID: number | null | undefined; | ||
activatedPointID: number | null | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
activatedPointID?: number | null
top: number; | ||
} | ||
|
||
class CanvasContextMenuContainer extends React.PureComponent<Props, State> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CanvasPointContextMenuContainer
Delete point with simple context menu and without using
Ctrl+double click