app: show local filename in top bar (#572)

* fix URL state of showTileBoundaries
* improve cursor hover
This commit is contained in:
Brandon Liu
2025-05-12 16:28:47 -07:00
committed by GitHub
parent 1c48de7492
commit 77612d37ee
3 changed files with 35 additions and 4 deletions

View File

@@ -369,6 +369,10 @@ function MapView(props: {
fitToBounds();
}
if (props.showTileBoundaries()) {
map.showTileBoundaries = true;
}
setZoom(map.getZoom());
map.on("zoom", (e) => {
setZoom(e.target.getZoom());
@@ -461,7 +465,7 @@ function MapView(props: {
</button>
<span class="app-border rounded px-2 flex items-center">
<input
class="mr-1"
class="mr-1 cursor-pointer"
id="inspectFeatures"
checked={props.inspectFeatures()}
type="checkbox"
@@ -469,11 +473,13 @@ function MapView(props: {
props.setInspectFeatures(!props.inspectFeatures());
}}
/>
<label for="inspectFeatures">Inspect features</label>
<label for="inspectFeatures" class="cursor-pointer">
Inspect features
</label>
</span>
<span class="app-border rounded px-2 flex items-center">
<input
class="mr-1"
class="mr-1 cursor-pointer"
id="showTileBoundaries"
checked={props.showTileBoundaries()}
type="checkbox"
@@ -481,7 +487,9 @@ function MapView(props: {
props.setShowTileBoundaries(!props.showTileBoundaries());
}}
/>
<label for="showTileBoundaries">Show tile bounds</label>
<label class="cursor-pointer" for="showTileBoundaries">
Show tile bounds
</label>
</span>
<button
class="px-4 py-1 btn-secondary cursor-pointer"