From: Paul Hänsch Date: Wed, 5 Aug 2020 14:56:18 +0000 (+0200) Subject: prevent overshooting of line corners X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=0aa4aa6d57b76d6ca32eb502e422b5f02bed3402;p=lobster prevent overshooting of line corners --- diff --git a/therapies/therapy_draw.js b/therapies/therapy_draw.js index 604c000..19542c8 100644 --- a/therapies/therapy_draw.js +++ b/therapies/therapy_draw.js @@ -18,11 +18,15 @@ body = document.body dbg = document.getElementById("jsdebug") canvas = document.getElementById("canvas") -data=document.getElementById("image_serialize") +data = document.getElementById("image_serialize") image = canvas.getContext("2d") mouse = 0 image_serialize="" +image.lineJoin = "round" +image.lineCap = "round" +data.value += " stroke-linejoin round " +data.value += " stroke-linecap round " // start and current coordinates of a draw // serves for tracking, whether path ends close to its beginning