From 96136d61114a47b8ef632734696f6282f7ad014c Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Sun, 20 Oct 2019 14:25:56 +0200 Subject: [PATCH] loleaflet: timeout for triggering 'press' event increased to 500 ms That has been done in order to avoid to trigger the context menu too early; so the user can start panning in a relaxed way. Change-Id: I64657efd55649584be74c96a31fbe2199a25f91a --- loleaflet/src/map/handler/Map.TouchGesture.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js index e8277faab..af3b09ba7 100644 --- a/loleaflet/src/map/handler/Map.TouchGesture.js +++ b/loleaflet/src/map/handler/Map.TouchGesture.js @@ -37,6 +37,10 @@ L.Map.TouchGesture = L.Handler.extend({ this._hammer.get('pinch').set({ enable: true }); + // avoid to trigger the context menu too early so the user can start panning in a relaxed way + this._hammer.get('press').set({ + time: 500 + }); var singleTap = this._hammer.get('tap'); var doubleTap = this._hammer.get('doubletap');