ISSUE-032 - Progress checkpoint.

Have a lot of the scaffolding in place. Next step is to make the Chyron controls actually work.
Dramatic re-thinking of the chyron state definitions.
Lots of goofy type following tricks in broadcastGraphics.ts.
This commit is contained in:
Kyle Geib committed 2022-01-28 17:53:50 -05:00
1 parent 8e4ac1243b
commit 5e7940a151
15 files changed
+266 -54

No files matched your search

@@ -13,7 +13,7 @@ export const broadcastGraphicsSlice = createSlice({
chyronsLaunch: (state, action: PayloadAction<BGChyrons>) => {
state.chyrons = action.payload;
},
chyronsSetOpenState: (state, action: PayloadAction<OpenState>) => {
chyronsOpenStateSet: (state, action: PayloadAction<OpenState>) => {
if (state.chyrons == null) return;
state.chyrons.primary.openState = action.payload;
@@ -21,6 +21,14 @@ export const broadcastGraphicsSlice = createSlice({
state.chyrons.secondary.openState = action.payload;
}
},
chyronsOpenStateIncrement: (state) => {
if (state.chyrons == null) return;
++state.chyrons.primary.openState;
if (state.chyrons.secondary != null) {
++state.chyrons.secondary.openState;
}
},
chyronsClear: (state) => {
state.chyrons = null;
},
@@ -29,6 +37,8 @@ export const broadcastGraphicsSlice = createSlice({
export const {
chyronsLaunch,
chyronsOpenStateSet,
chyronsOpenStateIncrement,
chyronsClear,
} = broadcastGraphicsSlice.actions;
export default broadcastGraphicsSlice.reducer;