Skip to content

Commit 176dc71

Browse files
authored
React UI: batch of fixes (#1462)
* CVAT new UI: add arrows on a mouse cursor * Delete point bug (in new UI)
1 parent 191d15e commit 176dc71

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3030
- Annotation uploading fails in annotation view (<https://github.com/opencv/cvat/pull/1445>)
3131
- UI freezes after canceling pasting with escape (<https://github.com/opencv/cvat/pull/1445>)
3232
- Duplicating keypoints in COCO export (https://github.com/opencv/cvat/pull/1435)
33+
- CVAT new UI: add arrows on a mouse cursor (<https://github.com/opencv/cvat/pull/1391>)
34+
- Delete point bug (in new UI) (<https://github.com/opencv/cvat/pull/1440>)
3335

3436
### Security
3537
-

cvat-canvas/src/scss/canvas.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,26 @@ polyline.cvat_canvas_shape_splitting {
126126
pointer-events: none;
127127
}
128128

129+
.svg_select_points_lb:hover, .svg_select_points_rt:hover {
130+
cursor: nesw-resize;
131+
}
132+
133+
.svg_select_points_lt:hover, .svg_select_points_rb:hover {
134+
cursor: nwse-resize;
135+
}
136+
137+
.svg_select_points_l:hover, .svg_select_points_r:hover {
138+
cursor: ew-resize;
139+
}
140+
141+
.svg_select_points_t:hover, .svg_select_points_b:hover {
142+
cursor: ns-resize;
143+
}
144+
145+
.cvat_canvas_shape_draggable:hover {
146+
cursor: move;
147+
}
148+
129149
#cvat_canvas_wrapper {
130150
width: calc(100% - 10px);
131151
height: calc(100% - 10px);

cvat-canvas/src/typescript/canvasView.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,7 @@ export class CanvasViewImpl implements CanvasView, Listener {
11901190
const shape = this.svgShapes[clientID];
11911191

11921192
shape.removeClass('cvat_canvas_shape_activated');
1193+
shape.removeClass('cvat_canvas_shape_draggable');
11931194

11941195
if (!drawnState.pinned) {
11951196
(shape as any).off('dragstart');
@@ -1281,6 +1282,7 @@ export class CanvasViewImpl implements CanvasView, Listener {
12811282
}
12821283

12831284
if (!state.pinned) {
1285+
shape.addClass('cvat_canvas_shape_draggable');
12841286
(shape as any).draggable().on('dragstart', (): void => {
12851287
this.mode = Mode.DRAG;
12861288
if (text) {

cvat-ui/src/containers/annotation-page/standard-workspace/canvas-point-context-menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class CanvasPointContextMenuContainer extends React.PureComponent<Props, State>
104104
}
105105

106106
if (typeof state.activatedStateID !== typeof props.activatedStateID
107-
|| typeof state.activatedPointID !== typeof props.activatedPointID) {
107+
|| state.activatedPointID !== props.activatedPointID) {
108108
newState.activatedStateID = props.activatedStateID;
109109
newState.activatedPointID = props.activatedPointID;
110110
}

0 commit comments

Comments
 (0)