]> git.plutz.net Git - lobster/commitdiff
prevent overshooting of line corners
authorPaul Hänsch <paul@plutz.net>
Wed, 5 Aug 2020 14:56:18 +0000 (16:56 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 5 Aug 2020 14:56:18 +0000 (16:56 +0200)
therapies/therapy_draw.js

index 604c000de3810e01f8d10d41dcdefdfb1b791eda..19542c8e2cca88cb5a91d0f582abec1d2076f5ca 100644 (file)
 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