From: paul Date: Fri, 1 Jul 2016 15:20:18 +0000 (+0000) Subject: except white erazer lines from autoclose X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=31e822c91021f8848238337a67fcf364f9135aad;p=lobster except white erazer lines from autoclose svn path=/trunk/; revision=119 --- diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index 63216ad..70d9c3f 100755 --- a/templates/therapy.html.sh +++ b/templates/therapy.html.sh @@ -266,7 +266,7 @@ function drawstart(x, y) { function drawstop() { // if path ends close to beginning ( < 50 px); then close path and fill - if ( mouse == 1 && Math.sqrt( Math.pow(stx - cux, 2) + Math.pow(sty - cuy, 2)) <= 50 ){ + if ( mouse == 1 && Math.sqrt( Math.pow(stx - cux, 2) + Math.pow(sty - cuy, 2)) <= 50 && c !== "#FFF" ){ image.lineTo( stx, sty ) image.stroke()