Skip to content

Commit 578cb79

Browse files
committed
Set the block minimum to 1 pixel
Set the block minimum to 1 pixel
1 parent fc3abf5 commit 578cb79

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* NodeJS QRCode generator. Can save image or svg to file, get standard base64 image data url text or get SVG serialized text. Cross-browser QRCode generator for pure javascript. Support Dot style, Logo, Background image, Colorful, Title etc. settings. support binary mode.(Running without DOM on server side)
55
*
6-
* Version 4.3.0
6+
* Version 4.3.1
77
*
88
* @author [ [email protected] ]
99
*
@@ -1107,6 +1107,12 @@ Drawing.prototype.draw = function(oQRCode) {
11071107
var nCount = oQRCode.getModuleCount();
11081108
var nWidth = Math.round(_htOption.width / nCount);
11091109
var nHeight = Math.round((_htOption.height - _htOption.titleHeight) / nCount);
1110+
if(nWidth<=1){
1111+
nWidth=1;
1112+
}
1113+
if(nHeight<=1){
1114+
nHeight=1;
1115+
}
11101116

11111117
_htOption.quietZone = Math.round(_htOption.quietZone);
11121118

0 commit comments

Comments
 (0)