Fixing css styling bugs, most works correctly now

This commit is contained in:
Pieter Vander Vennet 2021-01-18 19:36:19 +01:00
commit db91c5ead4
16 changed files with 394 additions and 14849 deletions

View file

@ -42,7 +42,8 @@ export class InitUiElements {
static InitAll(layoutToUse: LayoutConfig, layoutFromBase64: string, testing: UIEventSource<string>, layoutName: string,
layoutDefinition: string = "") {
layoutDefinition: string = "") {
if (layoutToUse === undefined) {
console.log("Incorrect layout")
new FixedUiElement(`Error: incorrect layout <i>${layoutName}</i><br/><a href='https://${window.location.host}/'>Go back</a>`).AttachTo("centermessage").onClick(() => {
@ -78,8 +79,6 @@ export class InitUiElements {
InitUiElements.InitBaseMap();
new FixedUiElement("").AttachTo("decoration-desktop"); // Remove the decoration
InitUiElements.setupAllLayerElements();
if (layoutToUse.customCss !== undefined) {
@ -215,6 +214,9 @@ export class InitUiElements {
.AttachTo("geolocate-button");
State.state.locationControl.ping();
// Reset the loading message once things are loaded
new CenterMessageBox().AttachTo("centermessage");
}
static LoadLayoutFromHash(userLayoutParam: UIEventSource<string>) {
@ -456,7 +458,5 @@ export class InitUiElements {
);
});
new CenterMessageBox().AttachTo("centermessage");
}
}