From d623a59c870eb3dea673a33518e5e7a44e24e4f3 Mon Sep 17 00:00:00 2001 From: byGalax Date: Sat, 16 May 2026 19:46:00 +0200 Subject: [PATCH] =?UTF-8?q?feat(P4A.T3):=20annotator=20toolbar=20=E2=80=94?= =?UTF-8?q?=20tool/color/width/undo/redo=20controls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../desktop/src/components/ImageAnnotator.tsx | 131 ++++++++++++++++-- 1 file changed, 120 insertions(+), 11 deletions(-) diff --git a/apps/desktop/src/components/ImageAnnotator.tsx b/apps/desktop/src/components/ImageAnnotator.tsx index c8c505a..a42abfc 100644 --- a/apps/desktop/src/components/ImageAnnotator.tsx +++ b/apps/desktop/src/components/ImageAnnotator.tsx @@ -34,15 +34,13 @@ export function ImageAnnotator({ file, onCancel, onSave }: Props) { // tool/color/width are read by Task 2 (drawing engine) and Task 3 (toolbar). // Defaults shown here are intentional so T2's pointer handlers work // immediately with sensible behavior before T3's UI is wired. - const [tool, _setTool] = useState('pen'); - const [color, _setColor] = useState('#ef4444'); - const [width, _setWidth] = useState(4); + const [tool, setTool] = useState('pen'); + const [color, setColor] = useState('#ef4444'); + const [width, setWidth] = useState(4); const draftRef = useRef(null); const [draftTick, setDraftTick] = useState(0); - void _setTool; void _setColor; void _setWidth; void redoStack; - useEffect(() => { const url = URL.createObjectURL(file); const img = new Image(); @@ -236,13 +234,113 @@ export function ImageAnnotator({ file, onCancel, onSave }: Props) { )} -