From f4c1c27f2136ce798ccfaed0afee33c1af6b73c0 Mon Sep 17 00:00:00 2001 From: Pyro Nicampt <81565698+PyroNicampt@users.noreply.github.com> Date: Fri, 13 Feb 2026 18:57:34 -0600 Subject: [PATCH] Fix for right click breaking touch count --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index bea3d41..b8f8017 100644 --- a/index.js +++ b/index.js @@ -172,6 +172,10 @@ function mapNavigationSetup(){ mapContainer.addEventListener('pointerdown', touchDownHandler); mapContainer.addEventListener('wheel', scrollHandler); + mapContainer.addEventListener('contextmenu', e => { + touchCache = {}; + touchCount = 0; + }); document.getElementById('navZoomIn').addEventListener('click', e => {navButtonInput('zoomIn');}); document.getElementById('navZoomOut').addEventListener('click', e => {navButtonInput('zoomOut');});