mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
fix: Drawings visibility not aligned with map option
This commit is contained in:
@@ -92,7 +92,12 @@ export function DrawingMenu(props: { open: boolean; onClose: () => void }) {
|
||||
hover:scale-125 hover:text-gray-200
|
||||
`}
|
||||
onClick={() => {
|
||||
container.setVisibility(!container.getVisibility(), true);
|
||||
|
||||
if (container === mainDrawingsContainer.container) {
|
||||
getApp().getMap().setOption("showMissionDrawings", !getApp().getMap().getOptions().showMissionDrawings);
|
||||
} else {
|
||||
container.setVisibility(!container.getVisibility(), true);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<div
|
||||
|
||||
@@ -66,7 +66,9 @@ export function Header() {
|
||||
|
||||
useEffect(() => {
|
||||
HiddenTypesChangedEvent.on((hiddenTypes) => setMapHiddenTypes({ ...hiddenTypes }));
|
||||
MapOptionsChangedEvent.on((mapOptions) => setMapOptions({ ...mapOptions }));
|
||||
MapOptionsChangedEvent.on((mapOptions) => {
|
||||
setMapOptions({ ...mapOptions })
|
||||
});
|
||||
MapSourceChangedEvent.on((source) => setMapSource(source));
|
||||
ConfigLoadedEvent.on((config: OlympusConfig) => {
|
||||
// Timeout needed to make sure the map configuration has updated
|
||||
|
||||
Reference in New Issue
Block a user