forked from MapComplete/MapComplete
Improvements to velopark
This commit is contained in:
parent
782926c09d
commit
685fd5b26c
7 changed files with 78 additions and 11 deletions
|
@ -69,6 +69,7 @@ import {
|
|||
import summaryLayer from "../assets/generated/layers/summary.json"
|
||||
import { LayerConfigJson } from "./ThemeConfig/Json/LayerConfigJson"
|
||||
import Locale from "../UI/i18n/Locale"
|
||||
import Hash from "../Logic/Web/Hash"
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -496,6 +497,12 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
if (this.layout.customCss !== undefined && window.location.pathname.indexOf("theme") >= 0) {
|
||||
Utils.LoadCustomCss(this.layout.customCss)
|
||||
}
|
||||
|
||||
Hash.hash.addCallbackAndRunD(hash => {
|
||||
if(hash === "current_view" || hash.match(/current_view_[0-9]+/)){
|
||||
this.selectCurrentView()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -821,4 +828,9 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
this.userRelatedState.preferredBackgroundLayer
|
||||
)
|
||||
}
|
||||
|
||||
public selectCurrentView(){
|
||||
this.guistate.closeAll()
|
||||
this.selectedElement.setData(this.currentView.features?.data?.[0])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue