From 4111e9d1b843f785eedde1cf4ae0b0f4b1e93e71 Mon Sep 17 00:00:00 2001 From: florent <flavelle@neogeo.fr> Date: Thu, 28 Apr 2022 16:07:22 +0200 Subject: [PATCH] fix polygon drawing finish on mobile --- src/services/edition-service.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/edition-service.js b/src/services/edition-service.js index 1595d4f6..fff42ff6 100644 --- a/src/services/edition-service.js +++ b/src/services/edition-service.js @@ -125,7 +125,8 @@ const editionService = { // On mobile stop drawing when selecting a drawn point if (isMobile) { this.selectForUpdate.on('select', () => { - if (this.draw.getActive() && this.draw.sketchCoords_.length > 2) { + // Permet de stopper le dessin de ligne ou polygone sur mobile + if (this.draw.getActive() && (this.draw.sketchCoords_.length > 2 || this.draw.sketchCoords_[0].length > 3)) { this.draw.finishDrawing(); } }); -- GitLab