From c0c8b16d84a71083eca24e58a9d3846b6d304411 Mon Sep 17 00:00:00 2001 From: cssivision Date: Thu, 26 May 2016 10:55:35 +0800 Subject: [PATCH] fix qrcode can't be recognized --- lib/QRCode.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/QRCode.js b/lib/QRCode.js index e7cc30b..fdac197 100644 --- a/lib/QRCode.js +++ b/lib/QRCode.js @@ -20,6 +20,8 @@ function renderCanvas(canvas) { var cells = this.cells; var cellWidth = this.size / cells.length; var cellHeight = this.size / cells.length; + var nRoundedWidth = Math.round(cellWidth); + var nRoundedHeight = Math.round(cellHeight); cells.forEach(function(row, rowIndex) { row.forEach(function(column, columnIndex) { var nLeft = columnIndex * cellWidth;