Merge pull request #19534 from bschantz/interaction-options

[openlayers] Adding missing options on PinchZoom and MouseWheelZoom
This commit is contained in:
Nathan Shively-Sanders
2017-09-05 15:41:56 -07:00
committed by GitHub
2 changed files with 19 additions and 2 deletions

View File

@@ -12578,11 +12578,15 @@ declare module olx {
/**
* @typedef {{duration: (number|undefined),
* @typedef {{constrainResolution: (boolean|undefined),
* duration: (number|undefined),
* timeout: (number|undefined),
* useAnchor: (boolean|undefined)}}
*/
interface MouseWheelZoomOptions {
constrainResolution?: boolean;
duration?: number;
timeout?: number;
useAnchor?: boolean;
}
@@ -12598,9 +12602,11 @@ declare module olx {
/**
* @typedef {{duration: (number|undefined)}}
* @typedef {{constrainResolution: (boolean|undefined)
* duration: (number|undefined)}}
*/
interface PinchZoomOptions {
constrainResolution?: boolean;
duration?: number;
}

View File

@@ -717,6 +717,17 @@ const select: ol.interaction.Select = new ol.interaction.Select({
layers: (layer: ol.layer.Layer) => true,
});
let pinchZoom: ol.interaction.PinchZoom = new ol.interaction.PinchZoom({
constrainResolution: booleanValue,
duration: numberValue
});
let mouseWheelZoom: ol.interaction.MouseWheelZoom = new ol.interaction.MouseWheelZoom({
constrainResolution: booleanValue,
duration: numberValue,
timeout: numberValue,
useAnchor: booleanValue
});
//
// ol.style.RegularShape
//