From b9a357130bb1f6aa01e4378e76adf6abac342ffe Mon Sep 17 00:00:00 2001 From: Job Vonk Date: Tue, 11 Aug 2020 12:43:50 +0200 Subject: [PATCH] [bug]: Fixed sub-paths for lines not being reset See: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/stroke#Re-stroking_paths --- lib/renderer/CanvasRenderer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/renderer/CanvasRenderer.js b/lib/renderer/CanvasRenderer.js index 22c2233..f3e7cfa 100644 --- a/lib/renderer/CanvasRenderer.js +++ b/lib/renderer/CanvasRenderer.js @@ -92,6 +92,7 @@ class CanvasRenderer { ctx.fill(); } else if (child.style && child.target) { + ctx.beginPath(); ctx.moveTo(0,0); ctx.lineTo(child.target.x, child.target.y); ctx.strokeStyle = child.style; -- 2.45.2