Using "alt" instead of "ctrl" to delete a point, fixed reducer (#2204)

* Using alt instead of ctrl to delete a point, fixed reducer

* Updated versions

* Updated changelog
main
Boris Sekachev 5 years ago committed by GitHub
parent 4a8095914d
commit 4d869c3cf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- UI models (like DEXTR) were redesigned to be more interactive (<https://github.com/opencv/cvat/pull/2054>)
- Used Ubuntu:20.04 as a base image for CVAT Dockerfile (<https://github.com/opencv/cvat/pull/2101>)
- Right colors of label tags in label mapping when a user runs automatic detection (<https://github.com/openvinotoolkit/cvat/pull/2162>)
- A key to remove a point from a polyshape [Ctrl => Alt] (<https://github.com/openvinotoolkit/cvat/pull/2204>)
### Deprecated
-

@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.1.0",
"version": "2.1.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "2.1.0",
"version": "2.1.1",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {

@ -642,7 +642,7 @@ export class CanvasViewImpl implements CanvasView, Listener {
));
if (['polygon', 'polyline', 'points'].includes(state.shapeType)) {
if (e.ctrlKey) {
if (e.altKey) {
const { points } = state;
self.onEditDone(
state,
@ -897,7 +897,6 @@ export class CanvasViewImpl implements CanvasView, Listener {
// Setup event handlers
this.content.addEventListener('dblclick', (e: MouseEvent): void => {
if (e.ctrlKey || e.shiftKey) return;
self.controller.fit();
e.preventDefault();
});
@ -933,7 +932,7 @@ export class CanvasViewImpl implements CanvasView, Listener {
self.controller.drag(e.clientX, e.clientY);
if (this.mode !== Mode.IDLE) return;
if (e.ctrlKey || e.shiftKey) return;
if (e.ctrlKey || e.altKey) return;
const { offset } = this.controller.geometry;
const [x, y] = translateToSVG(this.content, [e.clientX, e.clientY]);

@ -175,7 +175,7 @@ SVG.Element.prototype.resize = function constructor(...args: any): any {
handler = this.remember('_resizeHandler');
handler.resize = function(e: any) {
const { event } = e.detail;
if (event.button === 0 && !event.shiftKey && !event.ctrlKey) {
if (event.button === 0 && !event.shiftKey && !event.altKey) {
return handler.constructor.prototype.resize.call(this, e);
}
}

@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.9.5",
"version": "1.9.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.9.5",
"version": "1.9.6",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {

@ -111,7 +111,7 @@ function CanvasPointContextMenu(props: Props): React.ReactPortal | null {
return visible && contextMenuFor && type === ContextMenuType.CANVAS_SHAPE_POINT
? (ReactDOM.createPortal(
<div className='cvat-canvas-point-context-menu' style={{ top, left }}>
<Tooltip title='Delete point [Ctrl + dblclick]' mouseLeaveDelay={0}>
<Tooltip title='Delete point [Alt + dblclick]' mouseLeaveDelay={0}>
<Button type='link' icon='delete' onClick={onPointDelete}>
Delete point
</Button>

@ -66,15 +66,26 @@ export default function (
}
case ModelsActionTypes.GET_INFERENCE_STATUS_SUCCESS: {
const { inferences } = state;
if (action.payload.activeInference.status === 'finished') {
delete inferences[action.payload.taskID];
} else {
inferences[action.payload.taskID] = action.payload.activeInference;
return {
...state,
inferences: Object.fromEntries(
Object.entries(inferences)
.filter(([key]): boolean => +key !== action.payload.taskID),
),
};
}
const update: any = {};
update[action.payload.taskID] = action.payload.activeInference;
return {
...state,
inferences: { ...inferences },
inferences: {
...state.inferences,
...update,
},
};
}
case ModelsActionTypes.GET_INFERENCE_STATUS_FAILED: {

Loading…
Cancel
Save