Fix type check errors in ol/interaction/Extent

This commit is contained in:
Kevin Schmidt
2018-10-03 06:35:18 -06:00
parent 942a0976be
commit 909869b8b9
+2 -2
View File
@@ -243,7 +243,7 @@ class ExtentInteraction extends PointerInteraction {
extentFeature = new Feature(polygonFromExtent(extent)); extentFeature = new Feature(polygonFromExtent(extent));
} }
this.extentFeature_ = extentFeature; this.extentFeature_ = extentFeature;
this.extentOverlay_.getSource().addFeature(extentFeature); /** @type {VectorSource} */ (this.extentOverlay_.getSource()).addFeature(extentFeature);
} else { } else {
if (!extent) { if (!extent) {
extentFeature.setGeometry(undefined); extentFeature.setGeometry(undefined);
@@ -264,7 +264,7 @@ class ExtentInteraction extends PointerInteraction {
if (!vertexFeature) { if (!vertexFeature) {
vertexFeature = new Feature(new Point(vertex)); vertexFeature = new Feature(new Point(vertex));
this.vertexFeature_ = vertexFeature; this.vertexFeature_ = vertexFeature;
this.vertexOverlay_.getSource().addFeature(vertexFeature); /** @type {VectorSource} */ (this.vertexOverlay_.getSource()).addFeature(vertexFeature);
} else { } else {
const geometry = /** @type {Point} */ (vertexFeature.getGeometry()); const geometry = /** @type {Point} */ (vertexFeature.getGeometry());
geometry.setCoordinates(vertex); geometry.setCoordinates(vertex);