From f638f72fd3b6395e1e68061673c9737a481caeee Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 3 Aug 2016 08:42:25 +0000 Subject: [PATCH] js compatibility for firefox and android browser svn path=/trunk/; revision=131 --- static/therapy_draw.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/static/therapy_draw.js b/static/therapy_draw.js index 8266ac5..8a8e936 100644 --- a/static/therapy_draw.js +++ b/static/therapy_draw.js @@ -74,12 +74,8 @@ function drawstart(x, y) { stx=relX(x), sty=relY(y) - document.getElementsByName("penwidth").forEach( - function(x, y, z){ if (x.checked) setstroke(x.value); } - ); - document.getElementsByName("color").forEach( - function(x, y, z){ if (x.checked) setcol(x.value); } - ); + setstroke(document.querySelector('input[name="penwidth"]:checked').value); + setcol(document.querySelector('input[name="color"]:checked').value); image.beginPath() draw(x, y) // why must this not use relative Coords ??? -- 2.39.2