Accessibility: improve keyboard only flow (see #1181); remove some legacy use of Svelte

This commit is contained in:
Pieter Vander Vennet 2023-12-06 17:27:30 +01:00
parent d1a6c11513
commit 4ee83cfe5c
35 changed files with 613 additions and 683 deletions

View file

@ -410,8 +410,13 @@ class LineRenderingLayer {
this._listenerInstalledOn.add(id)
tags.addCallbackAndRunD((properties) => {
// Make sure to use 'getSource' here, the layer names are different!
if (map.getSource(this._layername) === undefined) {
return true
try {
if (map.getSource(this._layername) === undefined) {
return true
}
} catch (e) {
console.debug("Could not fetch source for", this._layername)
return
}
map.setFeatureState(
{ source: this._layername, id },