This commit is contained in:
Pieter Vander Vennet 2024-02-15 16:20:47 +01:00
parent 3461ed6099
commit 327a2860c7

View file

@ -265,12 +265,15 @@
{#if state.lastClickObject.hasPresets || state.lastClickObject.hasNoteLayer} {#if state.lastClickObject.hasPresets || state.lastClickObject.hasNoteLayer}
<button <button
class="pointer-events-auto w-fit" class="pointer-events-auto w-fit"
class:disabled={$currentZoom < Constants.minZoomLevelToAddNewPoint}
on:click={() => { on:click={() => {
state.openNewDialog() state.openNewDialog()
}} }}
on:keydown={forwardEventToMap} on:keydown={forwardEventToMap}
> >
{#if state.lastClickObject.hasPresets} {#if $currentZoom < Constants.minZoomLevelToAddNewPoint}
<Tr t={Translations.t.general.add.zoomInFurther}/>
{:else if state.lastClickObject.hasPresets}
<Tr t={Translations.t.general.add.title} /> <Tr t={Translations.t.general.add.title} />
{:else} {:else}
<Tr t={Translations.t.notes.addAComment} /> <Tr t={Translations.t.notes.addAComment} />