Skip to content

Commit 3dc498e

Browse files
committed
minmum block size for IE
# readme update + minmum block size for IE
1 parent 55f1873 commit 3dc498e

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

dist/easy.qrcode.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "easyqrcodejs",
3-
"version": "4.4.1",
3+
"version": "4.4.2",
44
"description": "Cross-browser QRCode generator for pure javascript. Support Canvas, SVG and Table drawing methods. Support Dot style, Logo, Background image, Colorful, Title etc. settings. Support Angular, Vue.js, React, Next.js, Svelte framework. Support binary(hex) data mode.(Running with DOM on client side)",
55
"main": "dist/easy.qrcode.min.js",
66
"scripts": {},

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ var qrcode = new QRCode(DOM_object, options_object);
343343
| **logo** | N | String | `undefined` | Logo Image Path or Base64 encoded image. If use relative address, relative to `easy.qrcode.min.js` |   |
344344
| **logoWidth** | N | Number | `width/3.5` | Fixed logo width. |   |
345345
| **logoHeight** | N | Number | `height/3.5` | fixed logo height. |   |
346-
| **maxLogoWidth** | N | Number | `undefined` | Maximum logo width. if set will ignore `logoWidth` value. |   |
347-
| **maxLogoHeight** | N | Number | `undefined` | Maximum logo height. if set will ignore `logoHeight` value. |   |
346+
| **logoMaxWidth** | N | Number | `undefined` | Maximum logo width. if set will ignore `logoWidth` value. |   |
347+
| **logoMaxHeight** | N | Number | `undefined` | Maximum logo height. if set will ignore `logoHeight` value. |   |
348348
| **logoBackgroundTransparent** | N | Boolean | `false` | Whether the background transparent image(`PNG`) shows transparency. When `true`, `logoBackgroundColor` is invalid |   |
349349
| **logoBackgroundColor** | N | String | `#ffffff` | Set Background CSS Color when image background transparent. Valid when `logoBackgroundTransparent` is `false` |   |
350350
| Backgroud Image options| ---|--- |---|---|---|

src/easy.qrcode.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Cross-browser QRCode generator for pure javascript. Support Canvas, SVG and Table drawing methods. Support Dot style, Logo, Background image, Colorful, Title etc. settings. Support Angular, Vue.js, React, Next.js, Svelte framework. Support binary(hex) data mode.(Running with DOM on client side)
55
*
6-
* Version 4.4.1
6+
* Version 4.4.2
77
*
88
* @author [ [email protected] ]
99
*
@@ -1058,6 +1058,12 @@
10581058
var nCount = oQRCode.getModuleCount();
10591059
var nWidth = Math.round(_htOption.width / nCount);
10601060
var nHeight = Math.round((_htOption.height - _htOption.titleHeight) / nCount);
1061+
if(nWidth<=1){
1062+
nWidth=1;
1063+
}
1064+
if(nHeight<=1){
1065+
nHeight=1;
1066+
}
10611067

10621068
this._htOption.width = nWidth * nCount;
10631069
this._htOption.height = nHeight * nCount + _htOption.titleHeight;
@@ -1426,13 +1432,11 @@
14261432
// var _elImage = this._elImage;
14271433
var _htOption = this._htOption;
14281434

1429-
14301435
if (!_htOption.title && !_htOption.subTitle) {
14311436
_htOption.height -= _htOption.titleHeight;
14321437
_htOption.titleHeight = 0;
14331438
}
14341439

1435-
14361440
var nCount = oQRCode.getModuleCount();
14371441
var nWidth = Math.round(_htOption.width / nCount);
14381442
var nHeight = Math.round((_htOption.height - _htOption.titleHeight) / nCount);

0 commit comments

Comments
 (0)