Comparing version 0.1.3 to 0.2.0
{ | ||
"name": "qrjs", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"description": "QR code generator in Javascript", | ||
@@ -5,0 +5,0 @@ "main": "qr.js", |
@@ -716,2 +716,4 @@ /* qr.js -- QR code generator in Javascript (revision 2011-01-19) | ||
var modsize = Math.max(options.modulesize || 5, 0.5); | ||
var unit = options.unit || 'px'; | ||
var ratio = options.ratio || 1; | ||
var margin = Math.max(options.margin !== null ? options.margin : 4, 0.0); | ||
@@ -726,3 +728,6 @@ | ||
for (var j = 0; j < n; ++j) { | ||
html.push('<td style="width:' + modsize + 'px;height:' + modsize + 'px' + | ||
const size = unit !== 'px' | ||
? 'width:' + modsize * ratio + unit + '; height:' + modsize * ratio + unit | ||
: 'width:' + modsize + 'px;height:' + modsize + 'px' | ||
html.push('<td style="' + size + | ||
(matrix[i][j] ? ';background:#000' : '') + '" ' + | ||
@@ -729,0 +734,0 @@ 'part="' + (matrix[i][j] ? 'module-fg' : 'module-bg') + '" ' + '></td>'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29870
767