From ad1dec58ecdb5c3a67e115d73c1b4341050e6234 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 3 Sep 2018 15:15:58 +0200 Subject: [PATCH 1/2] Rename Extent to ExtentInteraction --- src/ol/interaction/Extent.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ol/interaction/Extent.js b/src/ol/interaction/Extent.js index 7757a2e315..2139007ffa 100644 --- a/src/ol/interaction/Extent.js +++ b/src/ol/interaction/Extent.js @@ -48,7 +48,7 @@ const ExtentEventType = { /** * @classdesc - * Events emitted by {@link module:ol/interaction/Extent~Extent} instances are + * Events emitted by {@link module:ol/interaction/Extent~ExtentInteraction} instances are * instances of this type. */ class ExtentInteractionEvent extends Event { @@ -313,7 +313,7 @@ class ExtentInteraction extends PointerInteraction { /** * @param {module:ol/MapBrowserEvent} mapBrowserEvent Event. * @return {boolean} Propagate event? - * @this {module:ol/interaction/Extent~Extent} + * @this {module:ol/interaction/Extent~ExtentInteraction} */ function handleEvent(mapBrowserEvent) { if (!(mapBrowserEvent instanceof MapBrowserPointerEvent)) { @@ -332,7 +332,7 @@ function handleEvent(mapBrowserEvent) { /** * @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event. * @return {boolean} Event handled? - * @this {module:ol/interaction/Extent~Extent} + * @this {module:ol/interaction/Extent~ExtentInteraction} */ function handleDownEvent(mapBrowserEvent) { const pixel = mapBrowserEvent.pixel; @@ -391,7 +391,7 @@ function handleDownEvent(mapBrowserEvent) { /** * @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event. * @return {boolean} Event handled? - * @this {module:ol/interaction/Extent~Extent} + * @this {module:ol/interaction/Extent~ExtentInteraction} */ function handleDragEvent(mapBrowserEvent) { if (this.pointerHandler_) { @@ -405,7 +405,7 @@ function handleDragEvent(mapBrowserEvent) { /** * @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event. * @return {boolean} Stop drag sequence? - * @this {module:ol/interaction/Extent~Extent} + * @this {module:ol/interaction/Extent~ExtentInteraction} */ function handleUpEvent(mapBrowserEvent) { this.pointerHandler_ = null; From 8fdc4cc9fc5653994ea0663e461001f856ff3420 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 3 Sep 2018 15:25:31 +0200 Subject: [PATCH 2/2] Change property test in MousePosition options TypeScript doesn't like the current implementation: ``` src/ol/control/MousePosition.js(82,64): error TS2339: Property 'undefinedHTML' does not exist on type 'never'. ``` --- src/ol/control/MousePosition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/control/MousePosition.js b/src/ol/control/MousePosition.js index 680a2120a8..97684cb8e2 100644 --- a/src/ol/control/MousePosition.js +++ b/src/ol/control/MousePosition.js @@ -79,7 +79,7 @@ class MousePosition extends Control { * @private * @type {string} */ - this.undefinedHTML_ = 'undefinedHTML' in options ? options.undefinedHTML : ' '; + this.undefinedHTML_ = options.undefinedHTML !== undefined ? options.undefinedHTML : ' '; /** * @private