From da27a2f5cee9d2d15d808c928fc05a282571a7fd Mon Sep 17 00:00:00 2001 From: Dicken Date: Thu, 25 Jun 2026 21:15:39 +0200 Subject: [PATCH] =?UTF-8?q?Whiteboard:=20Radierer-Fix=20(destination-out?= =?UTF-8?q?=20=E2=86=92=20Hintergrundfarbe),=20Icon=20=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/tools/whiteboard.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/tools/whiteboard.jsx b/frontend/src/tools/whiteboard.jsx index a2cf1b8..34a006d 100644 --- a/frontend/src/tools/whiteboard.jsx +++ b/frontend/src/tools/whiteboard.jsx @@ -11,7 +11,7 @@ const TOOLS = [ { id:'rect', label:'▭', tip:'Rechteck' }, { id:'ellipse', label:'◯', tip:'Ellipse' }, { id:'text', label:'T', tip:'Text' }, - { id:'eraser', label:'⌫', tip:'Radierer' }, + { id:'eraser', label:'🧹', tip:'Radierer' }, ]; const CURSOR_COLORS = ['#FF6B9D','#4ECDC4','#FFE66D','#60A5FA','#A78BFA','#FB923C']; @@ -143,8 +143,10 @@ function renderElements(ctx, elements, vp) { case 'eraser': { if (!el.points?.length) break; ctx.save(); - ctx.globalCompositeOperation = 'destination-out'; - ctx.lineWidth = (el.size || 20) / vp.zoom; + ctx.strokeStyle = '#0D0D0F'; // Hintergrundfarbe des Canvas + ctx.lineWidth = (el.size || 4) * 3 / vp.zoom; // Radierer ist 3× breiter als Stift + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; ctx.beginPath(); ctx.moveTo(el.points[0].x, el.points[0].y); for (const p of el.points.slice(1)) ctx.lineTo(p.x, p.y);