]> git.plutz.net Git - lobster/blobdiff - therapies/therapy_draw.js
prevent overshooting of line corners
[lobster] / 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