diff --git a/public/app.js b/public/app.js index a966547..6897e7c 100644 --- a/public/app.js +++ b/public/app.js @@ -392,16 +392,17 @@ // --- Helper: Polygon Path Generator --- function drawPolygonPath(targetCtx, sides, radius, cornerRadius = 0) { + targetCtx.beginPath(); if (sides === 0) { // Circle targetCtx.arc(0, 0, radius, 0, Math.PI * 2); + targetCtx.closePath(); return; } const angleStep = (Math.PI * 2) / sides; const startAngle = -Math.PI / 2; // Point top - targetCtx.beginPath(); for (let i = 0; i < sides; i++) { const a = startAngle + i * angleStep; const x = Math.cos(a) * radius;