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 ){
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 ???
cat <<EOF
<fieldset class=color>
- <input class=color type=radio name=color onclick="javascript:setcol('#000')" value="#000" id=c000 $c0><label for=c000></label>
- <input class=color type=radio name=color onclick="javascript:setcol('#00A')" value="#00A" id=c001 $c1><label for=c001></label>
- <input class=color type=radio name=color onclick="javascript:setcol('#0A0')" value="#0A0" id=c010 $c2><label for=c010></label>
- <input class=color type=radio name=color onclick="javascript:setcol('#0AA')" value="#0AA" id=c011 $c3><label for=c011></label>
- <input class=color type=radio name=color onclick="javascript:setcol('#A00')" value="#A00" id=c100 $c4><label for=c100></label>
- <input class=color type=radio name=color onclick="javascript:setcol('#A0A')" value="#A0A" id=c101 $c5><label for=c101></label>
- <input class=color type=radio name=color onclick="javascript:setcol('#AA0')" value="#AA0" id=c110 $c6><label for=c110></label>
- <input class=color type=radio name=color onclick="javascript:setcol('#FFF')" value="#FFF" id=c111 $c7><label for=c111></label>
+ <input class="color" type="radio" name="color" value="#000" id="c000" $c0><label for="c000"></label>
+ <input class="color" type="radio" name="color" value="#00A" id="c001" $c1><label for="c001"></label>
+ <input class="color" type="radio" name="color" value="#0A0" id="c010" $c2><label for="c010"></label>
+ <input class="color" type="radio" name="color" value="#0AA" id="c011" $c3><label for="c011"></label>
+ <input class="color" type="radio" name="color" value="#A00" id="c100" $c4><label for="c100"></label>
+ <input class="color" type="radio" name="color" value="#A0A" id="c101" $c5><label for="c101"></label>
+ <input class="color" type="radio" name="color" value="#AA0" id="c110" $c6><label for="c110"></label>
+ <input class="color" type="radio" name="color" value="#FFF" id="c111" $c7><label for="c111"></label>
</fieldset>
<img class="dotmark bg" src="?static=therapy_background.png" alt="WARNING: Background Image not available!">
<canvas id="canvas" class="dotmark ov" width="${bg_dim%x*}" height="${bg_dim#*x}"></canvas>