Added mouseclick / mouseleave to stop map zooming around

This commit is contained in:
laf
2015-08-31 19:10:53 +00:00
parent 3798a0f569
commit ca3869f48b

View File

@@ -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();
});
});
</script>';
} else {