From 40c4673db7aa2938d04c6adbc4985fb358a8c0c5 Mon Sep 17 00:00:00 2001 From: Paul Cockrell Date: Fri, 15 May 2020 09:46:21 +0100 Subject: [PATCH] Remove inline comments, seems to break pretokenisation or something! --- apps/dotmatrixclock/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dotmatrixclock/app.js b/apps/dotmatrixclock/app.js index da165572c..847b5d074 100755 --- a/apps/dotmatrixclock/app.js +++ b/apps/dotmatrixclock/app.js @@ -77,7 +77,7 @@ let selectedColor = "blue"; // Example // binToHex(["0111110", "1000000", "1000000", "1111110", "1000001", "1000001", "0111110"]) -function binToHex(bins /* array of binary strings */) { +function binToHex(bins) { return bins.map(bin => ("00" + (parseInt(bin, 2).toString(16))).substr(-2).toUpperCase()).join(""); } @@ -99,7 +99,7 @@ function drawPixel(opts) { g.fillRect(opts.x, opts.y, opts.x + opts.w, opts.y + opts.h); } -function drawGrid(pos /* {x:int, y:int} */, dims /* {rows:int, cols:int} */, charAsBin, opts /* {pxlW:int, pxlH:int, gap:int} */) { +function drawGrid(pos, dims, charAsBin, opts) { const defaultOpts = { pxlW: 5, pxlH: 5, @@ -121,7 +121,7 @@ function drawGrid(pos /* {x:int, y:int} */, dims /* {rows:int, cols:int} */, cha y: y, w: pxl.pxlW, h: pxl.pxlH, - color: color + color: color, }); } }