Use GuiState type instead of fully typed states

This commit is contained in:
Pieter Vander Vennet 2023-01-06 03:44:04 +01:00
parent 297aabf2b7
commit 8c35bfd67b

View file

@ -14,17 +14,10 @@ import FeatureInfoBox from "../Popup/FeatureInfoBox"
import CopyrightPanel from "./CopyrightPanel" import CopyrightPanel from "./CopyrightPanel"
import FeaturePipelineState from "../../Logic/State/FeaturePipelineState" import FeaturePipelineState from "../../Logic/State/FeaturePipelineState"
import Hotkeys from "../Base/Hotkeys" import Hotkeys from "../Base/Hotkeys"
import { DefaultGuiState } from "../DefaultGuiState"
export default class LeftControls extends Combine { export default class LeftControls extends Combine {
constructor( constructor(state: FeaturePipelineState, guiState: DefaultGuiState) {
state: FeaturePipelineState,
guiState: {
currentViewControlIsOpened: UIEventSource<boolean>
downloadControlIsOpened: UIEventSource<boolean>
filterViewIsOpened: UIEventSource<boolean>
copyrightViewIsOpened: UIEventSource<boolean>
}
) {
const currentViewFL = state.currentView?.layer const currentViewFL = state.currentView?.layer
const currentViewAction = new Toggle( const currentViewAction = new Toggle(
new Lazy(() => { new Lazy(() => {