From 9742fb7f59d79b43bcde2225c267bcd5e3d680ea Mon Sep 17 00:00:00 2001 From: Brian Schantz Date: Sun, 3 Sep 2017 11:32:09 -0700 Subject: [PATCH] openlayers: Adding missing options on olx.interaction.PinchZoomOptions and olx.interaction.MouseWheelZoomOptions --- types/openlayers/index.d.ts | 10 ++++++++-- types/openlayers/openlayers-tests.ts | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 7a6ca787f7..d149ef18bc 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -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; } diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index f0abcf28ce..f35c0adc98 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -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 //