React UI: batch of fixes (#1462)

* CVAT new UI: add arrows on a mouse cursor
* Delete point bug (in new UI)
main
Dmitry Kalinin 6 years ago committed by GitHub
parent 191d15e8fb
commit 176dc718a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Annotation uploading fails in annotation view (<https://github.com/opencv/cvat/pull/1445>)
- UI freezes after canceling pasting with escape (<https://github.com/opencv/cvat/pull/1445>)
- Duplicating keypoints in COCO export (https://github.com/opencv/cvat/pull/1435)
- CVAT new UI: add arrows on a mouse cursor (<https://github.com/opencv/cvat/pull/1391>)
- Delete point bug (in new UI) (<https://github.com/opencv/cvat/pull/1440>)
### Security
-

@ -126,6 +126,26 @@ polyline.cvat_canvas_shape_splitting {
pointer-events: none;
}
.svg_select_points_lb:hover, .svg_select_points_rt:hover {
cursor: nesw-resize;
}
.svg_select_points_lt:hover, .svg_select_points_rb:hover {
cursor: nwse-resize;
}
.svg_select_points_l:hover, .svg_select_points_r:hover {
cursor: ew-resize;
}
.svg_select_points_t:hover, .svg_select_points_b:hover {
cursor: ns-resize;
}
.cvat_canvas_shape_draggable:hover {
cursor: move;
}
#cvat_canvas_wrapper {
width: calc(100% - 10px);
height: calc(100% - 10px);

@ -1190,6 +1190,7 @@ export class CanvasViewImpl implements CanvasView, Listener {
const shape = this.svgShapes[clientID];
shape.removeClass('cvat_canvas_shape_activated');
shape.removeClass('cvat_canvas_shape_draggable');
if (!drawnState.pinned) {
(shape as any).off('dragstart');
@ -1281,6 +1282,7 @@ export class CanvasViewImpl implements CanvasView, Listener {
}
if (!state.pinned) {
shape.addClass('cvat_canvas_shape_draggable');
(shape as any).draggable().on('dragstart', (): void => {
this.mode = Mode.DRAG;
if (text) {

@ -104,7 +104,7 @@ class CanvasPointContextMenuContainer extends React.PureComponent<Props, State>
}
if (typeof state.activatedStateID !== typeof props.activatedStateID
|| typeof state.activatedPointID !== typeof props.activatedPointID) {
|| state.activatedPointID !== props.activatedPointID) {
newState.activatedStateID = props.activatedStateID;
newState.activatedPointID = props.activatedPointID;
}

Loading…
Cancel
Save