mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
fix: map sources not being loaded correctly in static version
This commit is contained in:
parent
8006d639ae
commit
f84b560351
@ -35,8 +35,11 @@ export function Header() {
|
||||
MapOptionsChangedEvent.on((mapOptions) => setMapOptions({ ...mapOptions }));
|
||||
MapSourceChangedEvent.on((source) => setMapSource(source));
|
||||
ConfigLoadedEvent.on((config: OlympusConfig) => {
|
||||
var sources = Object.keys(getApp().getMap().getMirrors()).concat(getApp().getMap().getLayers());
|
||||
setMapSources(sources);
|
||||
// Timeout needed to make sure the map configuration has updated
|
||||
window.setTimeout(() => {
|
||||
var sources = Object.keys(getApp().getMap().getMirrors()).concat(getApp().getMap().getLayers());
|
||||
setMapSources(sources);
|
||||
}, 200);
|
||||
});
|
||||
CommandModeOptionsChangedEvent.on((commandModeOptions) => {
|
||||
setCommandModeOptions(commandModeOptions);
|
||||
@ -116,7 +119,9 @@ export function Header() {
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
className="cursor-pointer rounded-full bg-blue-500 px-4 py-2 text-white"
|
||||
className={`
|
||||
cursor-pointer rounded-full bg-blue-500 px-4 py-2 text-white
|
||||
`}
|
||||
onClick={() => {
|
||||
getApp().getMap().setOption("tabletMode", !mapOptions.tabletMode);
|
||||
}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user