From 3c009483447338700b67a15eeed09b7f5e9e7046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Tue, 10 Jul 2012 23:02:52 +0000 Subject: Label design changes suggested by Kuro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Asbjørn Sloth Tønnesen --- web/js/labitrack.d/10-template-standard.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/js/labitrack.d/10-template-standard.js b/web/js/labitrack.d/10-template-standard.js index 09a8fc1..b351c41 100644 --- a/web/js/labitrack.d/10-template-standard.js +++ b/web/js/labitrack.d/10-template-standard.js @@ -148,7 +148,7 @@ } ctx.save(); - var scale = size / qrcode.getModuleCount(); + var scale = size / (qrcode.getModuleCount()+2); ctx.scale(scale, scale); // draw on the canvas @@ -156,7 +156,7 @@ for (var row = 0; row < qrcode.getModuleCount(); row++){ for (var col=0; col < qrcode.getModuleCount(); col++){ if (qrcode.isDark(row, col)) { - ctx.rect(col, row, 1, 1); + ctx.rect(col+1, row+1, 1, 1); } } } @@ -193,6 +193,7 @@ ctx.font = '40px sans-serif'; ctx.fillText('ID: '+data.id, 20, y); y += 40; + ctx.font = 'italic 40px sans-serif'; var lines = data.desc.split('\n'); for (var i=0; i