From: paul Date: Tue, 19 Jul 2016 11:43:53 +0000 (+0000) Subject: more reliable color selection, bugfix regarding backend color transparency X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=1c7bba82f5b6bc81fdedb9e4907019462982a749;p=confetti more reliable color selection, bugfix regarding backend color transparency svn path=/trunk/; revision=125 --- diff --git a/static/therapy_draw.js b/static/therapy_draw.js index 0b5dffa..5a06728 100644 --- a/static/therapy_draw.js +++ b/static/therapy_draw.js @@ -35,10 +35,9 @@ function setcol(c) { image.fillStyle = c if ( c == "#FFF" ) image.lineWidth = 32 else image.lineWidth = 4 - data.value += " stroke " + c + " stroke-width " + image.lineWidth + data.value += " stroke " + c + "F" + " stroke-width " + image.lineWidth } -setcol("$tpy[color]") function relX(x){ if ( body.clientWidth >= 800 ){ @@ -74,6 +73,10 @@ function drawstart(x, y) { stx=relX(x), sty=relY(y) + document.getElementsByName("color").forEach( + function(x, y, z){ if (x.checked) setcol(x.value); } + ); + image.beginPath() draw(x, y) // why must this not use relative Coords ??? diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index 4b8717d..6addbed 100755 --- a/templates/therapy.html.sh +++ b/templates/therapy.html.sh @@ -186,14 +186,14 @@ therapy_sessions cat < - - - - - - - - + + + + + + + + WARNING: Background Image not available!