Skip to content

Commit e6ad724

Browse files
committed
Set the block minimum to 1 pixel
Set the block minimum to 1 pixel
1 parent a54e39e commit e6ad724

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

QRCode.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* React Native QRCode generation component. Can generate standard QRCode image or base64 image data url text. Cross-browser QRCode generator for pure javascript. Support Dot style, Logo, Background image, Colorful, Title etc. settings. support binary mode.
55
*
6-
* Version 4.0.0
6+
* Version 4.0.1
77
*
88
* @author [ [email protected] ]
99
*
@@ -1083,6 +1083,12 @@ Drawing.prototype.draw = function(oQRCode) {
10831083
var nCount = oQRCode.getModuleCount();
10841084
var nWidth = Math.round(_htOption.width / nCount);
10851085
var nHeight = Math.round((_htOption.height - _htOption.titleHeight) / nCount);
1086+
if(nWidth<=1){
1087+
nWidth=1;
1088+
}
1089+
if(nHeight<=1){
1090+
nHeight=1;
1091+
}
10861092

10871093
_htOption.quietZone = Math.round(_htOption.quietZone);
10881094

0 commit comments

Comments
 (0)