More svelte work

This commit is contained in:
Pieter Vander Vennet 2023-01-31 14:45:32 +01:00
parent 890980d534
commit 112162e6c8
6 changed files with 75 additions and 31 deletions

View file

@ -108,7 +108,10 @@ class SingleLayerSelectionButton extends Toggle {
// Is the previous layer still valid? If so, we don't bother to switch
if (
previousLayer.data.feature === null ||
GeoOperations.inside(locationControl.data, previousLayer.data.feature)
GeoOperations.inside(
[locationControl.data.lon, locationControl.data.lat],
previousLayer.data.feature
)
) {
return
}