Remove inline comments, seems to break pretokenisation or something!

pull/422/head
Paul Cockrell 2020-05-15 09:46:21 +01:00
parent 04e3d3b455
commit 40c4673db7
1 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ let selectedColor = "blue";
// Example // Example
// binToHex(["0111110", "1000000", "1000000", "1111110", "1000001", "1000001", "0111110"]) // 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(""); 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); 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 = { const defaultOpts = {
pxlW: 5, pxlW: 5,
pxlH: 5, pxlH: 5,
@ -121,7 +121,7 @@ function drawGrid(pos /* {x:int, y:int} */, dims /* {rows:int, cols:int} */, cha
y: y, y: y,
w: pxl.pxlW, w: pxl.pxlW,
h: pxl.pxlH, h: pxl.pxlH,
color: color color: color,
}); });
} }
} }