From 42e9ae5780d59e41e107669e6576d517253e51c9 Mon Sep 17 00:00:00 2001 From: neveldo Date: Sat, 29 Nov 2014 19:38:53 +0100 Subject: [PATCH] Zoom on mousewheel only if zoom is enabled --- js/jquery.mapael.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mapael.js b/js/jquery.mapael.js index 761395535..bf39c0a55 100644 --- a/js/jquery.mapael.js +++ b/js/jquery.mapael.js @@ -130,7 +130,7 @@ /** * Update the zoom level of the map on mousewheel */ - options.map.zoom.mousewheel && $self.on("mousewheel", function(e) { + options.map.zoom.enabled && options.map.zoom.mousewheel && $self.on("mousewheel", function(e) { var offset = $self.offset(), initFactor = (options.map.width) ? ($.fn.mapael.maps[options.map.name].width / options.map.width) : ($.fn.mapael.maps[options.map.name].width / $self.width()) , zoomLevel = (e.deltaY > 0) ? 1 : -1