summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>2012-07-10 23:02:52 +0000
committerAsbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>2012-07-10 23:02:52 +0000
commit3c009483447338700b67a15eeed09b7f5e9e7046 (patch)
tree9c5cac70285e9e98257616f5be65b6005a16a0e3
parentc929d2f35bfd1bc975626d8d08138fc0ada17391 (diff)
downloadlabitrack-3c009483447338700b67a15eeed09b7f5e9e7046.tar.gz
labitrack-3c009483447338700b67a15eeed09b7f5e9e7046.tar.xz
labitrack-3c009483447338700b67a15eeed09b7f5e9e7046.zip
Label design changes suggested by Kuro
Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>
-rw-r--r--web/js/labitrack.d/10-template-standard.js5
1 files changed, 3 insertions, 2 deletions
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<lines.length;i++) {
ctx.fillText(lines[i], 20, y);