- implement camera zoom controls and state management

This commit is contained in:
2025-12-09 08:47:21 +00:00
parent fa33b012cc
commit b93b446614
9 changed files with 222 additions and 6 deletions

View File

@@ -37,6 +37,11 @@ export const initialState: CameraFeedState = {
B: "painter",
C: "painter",
},
zoomLevel: {
A: 1,
B: 1,
C: 1,
},
};
export function reducer(state: CameraFeedState, action: CameraFeedAction) {
@@ -106,7 +111,14 @@ export function reducer(state: CameraFeedState, action: CameraFeedAction) {
return {
...initialState,
};
case "SET_ZOOM_LEVEL":
return {
...state,
zoomLevel: {
...state.zoomLevel,
[action.payload.cameraFeedID]: action.payload.zoomLevel,
},
};
default:
return state;
}