diff --git a/src/Plugin/Interaction/MouseWheelZoom/js/mousewheelzoom.js b/src/Plugin/Interaction/MouseWheelZoom/js/mousewheelzoom.js index 09cabed..5ead99e 100644 --- a/src/Plugin/Interaction/MouseWheelZoom/js/mousewheelzoom.js +++ b/src/Plugin/Interaction/MouseWheelZoom/js/mousewheelzoom.js @@ -1,6 +1,7 @@ Drupal.openlayers.pluginManager.register({ fs: 'openlayers.Interaction:MouseWheelZoom', init: function(data) { + data.opt.constrainResolution = true; return new ol.interaction.MouseWheelZoom(data.opt); } }); diff --git a/src/Plugin/Interaction/PinchZoom/js/pinchzoom.js b/src/Plugin/Interaction/PinchZoom/js/pinchzoom.js index c75c6e0..c456ea6 100644 --- a/src/Plugin/Interaction/PinchZoom/js/pinchzoom.js +++ b/src/Plugin/Interaction/PinchZoom/js/pinchzoom.js @@ -1,6 +1,7 @@ Drupal.openlayers.pluginManager.register({ fs: 'openlayers.Interaction:PinchZoom', init: function(data) { + data.opt.constrainResolution = true; return new ol.interaction.PinchZoom(data.opt); } });