- Enhanced camera feed state management with region handling and mode changes
This commit is contained in:
@@ -103,9 +103,44 @@ export type CameraFeedState = {
|
||||
B: Map<string, PaintedCell>;
|
||||
C: Map<string, PaintedCell>;
|
||||
};
|
||||
regionsByCamera: {
|
||||
A: Region[];
|
||||
B: Region[];
|
||||
C: Region[];
|
||||
};
|
||||
selectedRegionIndex: number;
|
||||
modeByCamera: {
|
||||
A: string;
|
||||
B: string;
|
||||
C: string;
|
||||
};
|
||||
|
||||
tabIndex?: number;
|
||||
};
|
||||
|
||||
export type CameraFeedAction = {
|
||||
type: string;
|
||||
payload: "A" | "B" | "C";
|
||||
};
|
||||
export type CameraFeedAction =
|
||||
| {
|
||||
type: "SET_CAMERA_FEED";
|
||||
payload: "A" | "B" | "C";
|
||||
}
|
||||
| {
|
||||
type: "CHANGE_MODE";
|
||||
payload: { cameraFeedID: "A" | "B" | "C"; mode: string };
|
||||
}
|
||||
| { type: "SET_SELECTED_REGION_INDEX"; payload: number }
|
||||
| {
|
||||
type: "SET_SELECTED_REGION_COLOUR";
|
||||
payload: { cameraFeedID: "A" | "B" | "C"; regionName: string; newColour: string };
|
||||
}
|
||||
| {
|
||||
type: "ADD_NEW_REGION";
|
||||
payload: { cameraFeedID: "A" | "B" | "C"; regionName: string; brushColour: string };
|
||||
}
|
||||
| {
|
||||
type: "REMOVE_REGION";
|
||||
payload: { cameraFeedID: "A" | "B" | "C"; regionName: string };
|
||||
}
|
||||
| {
|
||||
type: "RESET_PAINTED_CELLS";
|
||||
payload: { cameraFeedID: "A" | "B" | "C"; paintedCells: Map<string, PaintedCell> };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user