From ca3869f48b7778e6c37002be9bf2c34bd89fefe9 Mon Sep 17 00:00:00 2001 From: laf Date: Mon, 31 Aug 2015 19:10:53 +0000 Subject: [PATCH] Added mouseclick / mouseleave to stop map zooming around --- html/includes/common/worldmap.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/html/includes/common/worldmap.inc.php b/html/includes/common/worldmap.inc.php index 7ab55228c..f6ba921a4 100644 --- a/html/includes/common/worldmap.inc.php +++ b/html/includes/common/worldmap.inc.php @@ -64,6 +64,15 @@ foreach (dbFetchRows("SELECT `device_id`,`hostname`,`os`,`status`,`lat`,`lng` FR } $temp_output .= 'map.addLayer(markers); +map.scrollWheelZoom.disable(); +$(document).ready(function(){ + $("#leaflet-map").on("click", function(event) { + map.scrollWheelZoom.enable(); + }); + $("#leaflet-map").mouseleave(function(event) { + map.scrollWheelZoom.disable(); + }); +}); '; } else {