feat: refine map control group states
This commit is contained in:
1 parent
df17afeb41
commit
8eec2d4ca4
3 files changed
+26
-5
No files matched your search
@@ -251,6 +251,7 @@ function setRouteVisible(visible) {
|
||||
route.addTo(map);
|
||||
}
|
||||
routeToggle.setAttribute("aria-label", "Hide route line");
|
||||
routeToggle.setAttribute("aria-pressed", "true");
|
||||
routeToggleIcon.innerHTML =
|
||||
'<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">' +
|
||||
'<path d="M3 11.5 6.2 8.2c.4-.4 1-.5 1.5-.2l1.1.7c.5.3 1.1.2 1.5-.2L13 5.8" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>' +
|
||||
@@ -262,6 +263,7 @@ function setRouteVisible(visible) {
|
||||
map.removeLayer(route);
|
||||
}
|
||||
routeToggle.setAttribute("aria-label", "Show route line");
|
||||
routeToggle.setAttribute("aria-pressed", "false");
|
||||
routeToggleIcon.innerHTML =
|
||||
'<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">' +
|
||||
'<path d="M3 11.5 6.2 8.2c.4-.4 1-.5 1.5-.2l1.1.7c.5.3 1.1.2 1.5-.2L13 5.8" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>' +
|
||||
|
||||
Reference in new issue
Block a user