From 909869b8b9885b9330e1433ea9a7d72988a8fdd5 Mon Sep 17 00:00:00 2001 From: Kevin Schmidt Date: Wed, 3 Oct 2018 06:35:18 -0600 Subject: [PATCH] Fix type check errors in ol/interaction/Extent --- src/ol/interaction/Extent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/interaction/Extent.js b/src/ol/interaction/Extent.js index c388b65b8f..58de76db9f 100644 --- a/src/ol/interaction/Extent.js +++ b/src/ol/interaction/Extent.js @@ -243,7 +243,7 @@ class ExtentInteraction extends PointerInteraction { extentFeature = new Feature(polygonFromExtent(extent)); } this.extentFeature_ = extentFeature; - this.extentOverlay_.getSource().addFeature(extentFeature); + /** @type {VectorSource} */ (this.extentOverlay_.getSource()).addFeature(extentFeature); } else { if (!extent) { extentFeature.setGeometry(undefined); @@ -264,7 +264,7 @@ class ExtentInteraction extends PointerInteraction { if (!vertexFeature) { vertexFeature = new Feature(new Point(vertex)); this.vertexFeature_ = vertexFeature; - this.vertexOverlay_.getSource().addFeature(vertexFeature); + /** @type {VectorSource} */ (this.vertexOverlay_.getSource()).addFeature(vertexFeature); } else { const geometry = /** @type {Point} */ (vertexFeature.getGeometry()); geometry.setCoordinates(vertex);