From c19f8b9abe793369bc446595b2716277a779508d Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 28 Oct 2020 23:50:13 +0100 Subject: [PATCH] Add spiek for line width support in turtle --- app/assets/javascripts/turtle.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/javascripts/turtle.js b/app/assets/javascripts/turtle.js index 5a07b764..05b7f549 100644 --- a/app/assets/javascripts/turtle.js +++ b/app/assets/javascripts/turtle.js @@ -97,6 +97,9 @@ Turtle.prototype.update = function () { if (item.fill) { ctx.strokeStyle = item.fill; } + if (item.width) { + ctx.lineWidth = item.width; + } ctx.stroke(); break; @@ -112,6 +115,9 @@ Turtle.prototype.update = function () { ctx.strokeStyle = item.fill; ctx.fill(); } + if (item.width) { + ctx.lineWidth = item.width; + } ctx.stroke(); break; case 'image':