Fix: toggle button if not zoomed in enough
This commit is contained in:
parent
2c49aa8d4e
commit
89434014c6
1 changed files with 9 additions and 2 deletions
|
@ -171,9 +171,16 @@
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<!-- bottom left elements -->
|
<!-- bottom left elements -->
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<button class="primary pointer-events-auto" on:click={() => {
|
<If condition={state.mapProperties.zoom.map(z => z >= Constants.minZoomLevelToAddNewPoint)}>
|
||||||
|
<button class="primary pointer-events-auto" on:click={() => {
|
||||||
state.openNewItemDialog()
|
state.openNewItemDialog()
|
||||||
}}>Add a new point</button>
|
}}>
|
||||||
|
Add a new point
|
||||||
|
</button>
|
||||||
|
<button class="primary disabled" slot="else">
|
||||||
|
Zoom in to add a new point
|
||||||
|
</button>
|
||||||
|
</If>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue