Implemented brush size feature in camera feed settings
This commit is contained in:
@@ -3,6 +3,7 @@ import { CAMERA_IDS, DEFAULT_REGIONS, type CameraID } from "../config/cameraConf
|
||||
|
||||
export const initialState: CameraFeedState = {
|
||||
cameraFeedID: CAMERA_IDS[0],
|
||||
brushSize: 1,
|
||||
paintedCells: CAMERA_IDS.reduce(
|
||||
(acc, id) => {
|
||||
acc[id] = new Map<string, PaintedCell>();
|
||||
@@ -110,6 +111,12 @@ export function reducer(state: CameraFeedState, action: CameraFeedAction) {
|
||||
[action.payload.cameraFeedID]: action.payload.zoomLevel,
|
||||
},
|
||||
};
|
||||
|
||||
case "SET_BRUSH_SIZE":
|
||||
return {
|
||||
...state,
|
||||
brushSize: action.payload.brushSize,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user