ISSUE-032 - Have Chyron prototyping controls configured and hooked up.
Support for double driver chyrons. Serious refactoring of the BroadcastGraphics states. Simplification and improvements to how the chyron states work (I was using interfaces in a way that was incompatible with reality and have fixed it).
This commit is contained in:
1 parent
d5b653da9d
commit
0625361a18
16 files changed
+233
-124
No files matched your search
@@ -32,7 +32,9 @@ export const broadcastDirectorSlice = createSlice({
|
||||
},
|
||||
/**
|
||||
* Shortcut to clear out selected cars. There is also a trick - if you
|
||||
* @param action Car (optional) - if provided, it'll clear all and add this.
|
||||
* provide a single Car it'll replace all selected cars with that single
|
||||
* car.
|
||||
* @param action Car (optional)
|
||||
*/
|
||||
selectedCarsClear: (state, action: PayloadAction<Optional<Car>>) => {
|
||||
if (action.payload == null) {
|
||||
|
||||
@@ -10,23 +10,23 @@ export const broadcastGraphicsSlice = createSlice({
|
||||
name: "broadcastGraphics",
|
||||
initialState,
|
||||
reducers: {
|
||||
chyronsLaunch: (state, action: PayloadAction<BGChyrons>) => {
|
||||
chyronsSet: (state, action: PayloadAction<BGChyrons>) => {
|
||||
state.chyrons = action.payload;
|
||||
},
|
||||
chyronsOpenStateSet: (state, action: PayloadAction<OpenState>) => {
|
||||
if (state.chyrons == null) return;
|
||||
state.chyrons.primary.openState = action.payload;
|
||||
state.chyrons.openState = action.payload;
|
||||
|
||||
if (state.chyrons.secondary != null) {
|
||||
state.chyrons.secondary.openState = action.payload;
|
||||
if (state.chyrons != null) {
|
||||
state.chyrons.openState = action.payload;
|
||||
}
|
||||
},
|
||||
chyronsOpenStateIncrement: (state) => {
|
||||
if (state.chyrons == null) return;
|
||||
++state.chyrons.primary.openState;
|
||||
++state.chyrons.openState;
|
||||
|
||||
if (state.chyrons.secondary != null) {
|
||||
++state.chyrons.secondary.openState;
|
||||
if (state.chyrons != null) {
|
||||
++state.chyrons.openState;
|
||||
}
|
||||
},
|
||||
chyronsClear: (state) => {
|
||||
@@ -36,7 +36,7 @@ export const broadcastGraphicsSlice = createSlice({
|
||||
});
|
||||
|
||||
export const {
|
||||
chyronsLaunch,
|
||||
chyronsSet,
|
||||
chyronsOpenStateSet,
|
||||
chyronsOpenStateIncrement,
|
||||
chyronsClear,
|
||||
|
||||
@@ -20,8 +20,8 @@ const initialState: RootState["event"] = {
|
||||
},
|
||||
grid: [
|
||||
{ position: 1, driver: cloneDriver("verstappen") },
|
||||
{ position: 3, driver: cloneDriver("hamilton") },
|
||||
{ position: 2, driver: cloneDriver("bottas") },
|
||||
{ position: 2, driver: cloneDriver("hamilton") },
|
||||
{ position: 3, driver: cloneDriver("bottas") },
|
||||
{ position: 4, driver: cloneDriver("perez") },
|
||||
{ position: 5, driver: cloneDriver("sainz") },
|
||||
{ position: 6, driver: cloneDriver("norris") },
|
||||
|
||||
Reference in new issue
Block a user