Skip to content
Snippets Groups Projects
Commit 4111e9d1 authored by Florent Lavelle's avatar Florent Lavelle
Browse files

fix polygon drawing finish on mobile

parent 3f40c51b
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment