fix: the search bar on the theme index was not clickable on wide screens as the 'centermessage' hovered over it invisibly

This commit is contained in:
Pieter Vander Vennet 2023-03-09 23:13:30 +01:00
parent e185606e73
commit af7672a0e0
2 changed files with 3 additions and 5 deletions

View file

@ -14,7 +14,6 @@ import { LoginToggle } from "./Popup/LoginButton"
export default class AllThemesGui { export default class AllThemesGui {
setup() { setup() {
try { try {
new FixedUiElement("").AttachTo("centermessage")
const state = new UserRelatedState(undefined) const state = new UserRelatedState(undefined)
const intro = new Combine([ const intro = new Combine([
new LanguagePicker1(Translations.t.index.title.SupportedLanguages(), "").SetClass( new LanguagePicker1(Translations.t.index.title.SupportedLanguages(), "").SetClass(
@ -42,7 +41,7 @@ export default class AllThemesGui {
"Seems like no layers are compiled - check the output of `npm run generate:layeroverview`. Is this visible online? Contact pietervdvn immediately!" "Seems like no layers are compiled - check the output of `npm run generate:layeroverview`. Is this visible online? Contact pietervdvn immediately!"
) )
.SetClass("alert") .SetClass("alert")
.AttachTo("centermessage") .AttachTo("top-left")
} }
} }
} }

View file

@ -40,14 +40,13 @@ const mode = QueryParameters.GetQueryParameter(
"map", "map",
"The mode the application starts in, e.g. 'statistics'" "The mode the application starts in, e.g. 'statistics'"
) )
const cm = document.getElementById("centermessage")
cm.parentElement.removeChild(cm)
if (mode.data === "statistics") { if (mode.data === "statistics") {
console.log("Statistics mode!") console.log("Statistics mode!")
new FixedUiElement("").AttachTo("centermessage")
new StatisticsGUI().SetClass("w-full h-full pointer-events-auto").AttachTo("topleft-tools") new StatisticsGUI().SetClass("w-full h-full pointer-events-auto").AttachTo("topleft-tools")
} else if (mode.data === "pdf") { } else if (mode.data === "pdf") {
MinimapImplementation.initialize() MinimapImplementation.initialize()
new FixedUiElement("").AttachTo("centermessage")
const div = document.createElement("div") const div = document.createElement("div")
div.id = "extra_div_for_maps" div.id = "extra_div_for_maps"
new PdfExportGui(div.id).SetClass("pointer-events-auto").AttachTo("topleft-tools") new PdfExportGui(div.id).SetClass("pointer-events-auto").AttachTo("topleft-tools")