Skip to content
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: batch of fixes #1462

Merged
merged 2 commits into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,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
-
Expand Down
20 changes: 20 additions & 0 deletions cvat-canvas/src/scss/canvas.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down