From 472d3174b6854ca0e084e41cf8b0921292cc0c9b Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 24 Mar 2020 20:34:25 +0300 Subject: [PATCH] Added undopoint in editing --- cvat-canvas/src/typescript/editHandler.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cvat-canvas/src/typescript/editHandler.ts b/cvat-canvas/src/typescript/editHandler.ts index defdb69e..07f366d6 100644 --- a/cvat-canvas/src/typescript/editHandler.ts +++ b/cvat-canvas/src/typescript/editHandler.ts @@ -99,6 +99,12 @@ export class EditHandlerImpl implements EditHandler { if (e.which === 1) { mouseX = e.clientX; mouseY = e.clientY; + } else if (e.which === 3 && this.editLine) { + if (this.editData.state.shapeType === 'points' + || this.editLine.attr('points').split(' ').length > 2 + ) { + (this.editLine as any).draw('undo'); + } } });