forked from MapComplete/MapComplete
Add custom theme generator
This commit is contained in:
parent
14930e2f93
commit
8d3c8ed9d9
8 changed files with 570 additions and 16 deletions
5
index.ts
5
index.ts
|
@ -70,7 +70,7 @@ let layoutToUse: Layout = AllKnownLayouts.allSets[defaultLayout] ?? AllKnownLayo
|
|||
|
||||
|
||||
const layoutFromBase64 = QueryParameters.GetQueryParameter("userlayout", "false").data;
|
||||
if(layoutFromBase64 === "true"){
|
||||
if(layoutFromBase64 !== "false"){
|
||||
layoutToUse = CustomLayoutFromJSON.FromQueryParam(hash.substr(1));
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,9 @@ console.log("Using layout: ", layoutToUse.name);
|
|||
|
||||
TagRendering.injectFunction();
|
||||
State.state = new State(layoutToUse);
|
||||
if(layoutFromBase64 !== "false"){
|
||||
State.state.layoutDefinition = hash.substr(1);
|
||||
}
|
||||
InitUiElements.InitBaseMap();
|
||||
|
||||
new FixedUiElement("").AttachTo("decoration"); // Remove the decoration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue