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

View File

@@ -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);