]> git.plutz.net Git - confetti/blobdiff - templates/therapy.html.sh
except white erazer lines from autoclose
[confetti] / templates / therapy.html.sh
index 63216ad703ced7ce40ca7120f70d4362e2932c3a..70d9c3fe704139cf2c19388e0a205364a634dacf 100755 (executable)
@@ -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()