Housekeeping

This commit is contained in:
Pieter Vander Vennet 2024-07-09 13:42:08 +02:00
parent 4ad1e67f6e
commit da615acfb1
55 changed files with 1772 additions and 1455 deletions

View file

@ -104,7 +104,7 @@
if (id.startsWith("current_view")) {
return currentViewLayer
}
if(id.startsWith("summary_")){
if (id.startsWith("summary_")) {
console.log("Not selecting a summary object. The summary object is", element)
return undefined
}
@ -125,11 +125,11 @@
state.mapProperties.installCustomKeyboardHandler(viewport)
let canZoomIn = mapproperties.maxzoom.map(
(mz) => mapproperties.zoom.data < mz,
[mapproperties.zoom],
[mapproperties.zoom]
)
let canZoomOut = mapproperties.minzoom.map(
(mz) => mapproperties.zoom.data > mz,
[mapproperties.zoom],
[mapproperties.zoom]
)
function updateViewport() {
@ -166,7 +166,7 @@
onDestroy(
rasterLayer.addCallbackAndRunD((l) => {
rasterLayerName = l.properties.name
}),
})
)
let previewedImage = state.previewedImage
@ -197,7 +197,7 @@
let openMapButton: UIEventSource<HTMLElement> = new UIEventSource<HTMLElement>(undefined)
let openMenuButton: UIEventSource<HTMLElement> = new UIEventSource<HTMLElement>(undefined)
let openCurrentViewLayerButton: UIEventSource<HTMLElement> = new UIEventSource<HTMLElement>(
undefined,
undefined
)
let _openNewElementButton: HTMLButtonElement
let openNewElementButton: UIEventSource<HTMLElement> = new UIEventSource<HTMLElement>(undefined)
@ -257,7 +257,9 @@
on:keydown={forwardEventToMap}
htmlElem={openMapButton}
>
<div class="m-0.5 mx-1 flex cursor-pointer items-center max-[480px]:w-full sm:mx-1 md:mx-2">
<div
class="m-0.5 mx-1 flex cursor-pointer items-center max-[480px]:w-full sm:mx-1 md:mx-2"
>
<Marker icons={layout.icon} size="h-4 w-4 md:h-8 md:w-8 mr-0.5 sm:mr-1 md:mr-2" />
<b class="mr-1">
<Tr t={layout.title} />
@ -354,10 +356,10 @@
<a
class="bg-black-transparent pointer-events-auto ml-1 h-fit max-h-12 cursor-pointer self-end self-center overflow-hidden rounded-2xl px-1 text-white opacity-50 hover:opacity-100"
on:click={() => {
if(featureSwitches.featureSwitchWelcomeMessage.data){
state.guistate.themeViewTab.setData("copyright")
state.guistate.themeIsOpened.setData(true)
}else{
if (featureSwitches.featureSwitchWelcomeMessage.data) {
state.guistate.themeViewTab.setData("copyright")
state.guistate.themeIsOpened.setData(true)
} else {
state.guistate.copyrightPanelIsOpened.setData(true)
}
}}
@ -520,11 +522,10 @@
<Tr t={Translations.t.general.attribution.title} />
</div>
<div slot="content2" class="flex flex-col m-2">
<div slot="content2" class="m-2 flex flex-col">
<ToSvelte construct={() => new CopyrightPanel(state)} />
</div>
<div class="flex" slot="title3">
<Share class="h-4 w-4" />
<Tr t={Translations.t.general.sharescreen.title} />
@ -650,15 +651,14 @@
<FloatOver on:close={() => state.guistate.privacyPanelIsOpened.setData(false)}>
<div class="flex h-full flex-col overflow-hidden">
<h1 class="low-interaction m-0 flex items-center p-4 drop-shadow-md">
<Tr t= {Translations.t.general.attribution.title}/>
<Tr t={Translations.t.general.attribution.title} />
</h1>
<div class="overflow-auto p-4">
<h2>
<Tr t={Translations.t.general.menu.aboutMapComplete} />
<Tr t={Translations.t.general.menu.aboutMapComplete} />
</h2>
<AboutMapComplete {state} />
<ToSvelte construct={() => new CopyrightPanel(state)} />
<AboutMapComplete {state} />
<ToSvelte construct={() => new CopyrightPanel(state)} />
</div>
</div>
</FloatOver>