refactoring(maplibre): WIP
This commit is contained in:
parent
231d67361e
commit
4d48b1cf2b
89 changed files with 1166 additions and 3973 deletions
16
index.ts
16
index.ts
|
@ -1,6 +1,5 @@
|
|||
import { FixedUiElement } from "./UI/Base/FixedUiElement"
|
||||
import Combine from "./UI/Base/Combine"
|
||||
import MinimapImplementation from "./UI/Base/MinimapImplementation"
|
||||
import { Utils } from "./Utils"
|
||||
import AllThemesGui from "./UI/AllThemesGui"
|
||||
import DetermineLayout from "./Logic/DetermineLayout"
|
||||
|
@ -9,11 +8,7 @@ import DefaultGUI from "./UI/DefaultGUI"
|
|||
import State from "./State"
|
||||
import ShowOverlayLayerImplementation from "./UI/ShowDataLayer/ShowOverlayLayerImplementation"
|
||||
import { DefaultGuiState } from "./UI/DefaultGuiState"
|
||||
import { QueryParameters } from "./Logic/Web/QueryParameters"
|
||||
import DashboardGui from "./UI/DashboardGui"
|
||||
|
||||
// Workaround for a stupid crash: inject some functions which would give stupid circular dependencies or crash the other nodejs scripts running from console
|
||||
MinimapImplementation.initialize()
|
||||
ShowOverlayLayerImplementation.Implement()
|
||||
// Miscelleanous
|
||||
Utils.DisableLongPresses()
|
||||
|
@ -38,16 +33,7 @@ class Init {
|
|||
// @ts-ignore
|
||||
window.mapcomplete_state = State.state
|
||||
|
||||
const mode = QueryParameters.GetQueryParameter(
|
||||
"mode",
|
||||
"map",
|
||||
"The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics'"
|
||||
)
|
||||
if (mode.data === "dashboard") {
|
||||
new DashboardGui(State.state, guiState).setup()
|
||||
} else {
|
||||
new DefaultGUI(State.state, guiState).setup()
|
||||
}
|
||||
new DefaultGUI(State.state, guiState).setup()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue