Skip to content

Commit

Permalink
Remove generic type LineString | Point in favor of the default Geomet…
Browse files Browse the repository at this point in the history
…ry (#634)

* Remove generic type LineString | Point in favor of the default Geometry

* Fix linter
  • Loading branch information
Greenscreen23 authored Jan 31, 2023
1 parent a485e41 commit e059318
Showing 1 changed file with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,15 +423,8 @@ export class OlMapManager {
return false;
}
this.layerFeatureManagerDictionary
.get(
layer as VectorLayer<
VectorSource<LineString | Point>
>
)!
.onFeatureClicked(
event,
feature as Feature<LineString | Point>
);
.get(layer as VectorLayer<VectorSource>)!
.onFeatureClicked(event, feature as Feature);
// we only want the top one -> a truthy return breaks this loop
return true;
},
Expand Down Expand Up @@ -473,15 +466,11 @@ export class OlMapManager {
}
// We stop propagating the event as soon as the onFeatureDropped function returns true
return this.layerFeatureManagerDictionary
.get(
layer as VectorLayer<VectorSource<LineString | Point>>
)!
.get(layer as VectorLayer<VectorSource>)!
.onFeatureDrop(
event,
event.features.getArray()[0] as Feature<
LineString | Point
>,
feature as Feature<Point>
event.features.getArray()[0]!,
feature as Feature
);
});
});
Expand Down

0 comments on commit e059318

Please sign in to comment.