Add new statistics view
This commit is contained in:
parent
6f6a5d7092
commit
716fda39aa
10 changed files with 342 additions and 171 deletions
11
index.ts
11
index.ts
|
@ -11,6 +11,7 @@ import ShowOverlayLayerImplementation from "./UI/ShowDataLayer/ShowOverlayLayerI
|
|||
import {DefaultGuiState} from "./UI/DefaultGuiState";
|
||||
import {QueryParameters} from "./Logic/Web/QueryParameters";
|
||||
import DashboardGui from "./UI/DashboardGui";
|
||||
import StatisticsGUI from "./UI/StatisticsGUI";
|
||||
|
||||
// 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()
|
||||
|
@ -38,11 +39,13 @@ class Init {
|
|||
// This 'leaks' the global state via the window object, useful for debugging
|
||||
// @ts-ignore
|
||||
window.mapcomplete_state = State.state;
|
||||
|
||||
const mode = QueryParameters.GetQueryParameter("mode", "map", "The mode the application starts in, e.g. 'map' or 'dashboard'")
|
||||
if(mode.data === "dashboard"){
|
||||
|
||||
const mode = QueryParameters.GetQueryParameter("mode", "map", "The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics'")
|
||||
if (mode.data === "statistics") {
|
||||
new StatisticsGUI().AttachTo("leafletDiv")
|
||||
} else if (mode.data === "dashboard") {
|
||||
new DashboardGui(State.state, guiState).setup()
|
||||
}else{
|
||||
} else {
|
||||
new DefaultGUI(State.state, guiState).setup()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue