From 977e797a41a8277cf3ab94ed62a5ef4f906430c7 Mon Sep 17 00:00:00 2001 From: Laurent Knoll <laurent.knoll@orange.com> Date: Tue, 18 Oct 2022 18:17:54 +0200 Subject: [PATCH] =?UTF-8?q?Ignore=20le=20dessin=20de=20contour=20de=20masq?= =?UTF-8?q?ue=20si=20CTRL=20(pour=20d=C3=A9placement=20photo)=20est=20pres?= =?UTF-8?q?s=C3=A9.=20Closes=20#8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/instruments/blobMask.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/instruments/blobMask.ts b/src/instruments/blobMask.ts index ff696f1..7d66c21 100644 --- a/src/instruments/blobMask.ts +++ b/src/instruments/blobMask.ts @@ -111,6 +111,9 @@ export class BlobMask extends AbstractInstrument<PathCoords> implements Instrume if(!this.active) { return true; } + if(event.modifiers.control) { + return true; // On ne fait si CONTROL est pressé en dessinant + } this.addMousePoint(event.point); return true; } @@ -119,12 +122,12 @@ export class BlobMask extends AbstractInstrument<PathCoords> implements Instrume * Déplacement de la souris */ private onMouseDrag(event : paper.MouseEvent) : boolean { - if(event.modifiers) { - - } if(!this.active) { return true; } + if(event.modifiers.control) { + return true; // On ne fait si CONTROL est pressé en dessinant + } this.addMousePoint(event.point); return true; } -- GitLab