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 {
setup() {
try {
new FixedUiElement("").AttachTo("centermessage")
const state = new UserRelatedState(undefined)
const intro = new Combine([
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!"
)
.SetClass("alert")
.AttachTo("centermessage")
.AttachTo("top-left")
}
}
}

View file

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