Implemented brush size feature in camera feed settings

This commit is contained in:
2026-01-13 16:10:05 +00:00
parent 1653d9f0d4
commit 1243ce2098
5 changed files with 50 additions and 19 deletions

View File

@@ -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;
}