Skip to content

Commit a8e171b

Browse files
committed
Update the width of title to not include quietZone
Update the width of title to not include quietZone
1 parent 1dcf64b commit a8e171b

File tree

4 files changed

+978
-5
lines changed

4 files changed

+978
-5
lines changed

index.js

+5-2
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.4.4
6+
* Version 4.4.5
77
*
88
* @author [ [email protected] ]
99
*
@@ -1162,9 +1162,11 @@ Drawing.prototype.draw = function(oQRCode) {
11621162
_oContext.lineWidth = 0;
11631163
_oContext.fillStyle = _htOption.colorLight;
11641164
_oContext.fillRect(0, 0, this._canvas.width, this._canvas.height);
1165+
// _oContext.clearRect(_htOption.quietZone, _htOption.quietZone, _htOption.width, _htOption.titleHeight);
11651166
}
11661167

11671168

1169+
11681170
var t = this;
11691171

11701172
function drawQuietZoneColor() {
@@ -1349,7 +1351,8 @@ Drawing.prototype.draw = function(oQRCode) {
13491351

13501352
if (_htOption.title) {
13511353
_oContext.fillStyle = _htOption.titleBackgroundColor;
1352-
_oContext.fillRect(0, 0, t._canvas.width, _htOption.titleHeight + this._htOption.quietZone);
1354+
// _oContext.fillRect(0, 0, t._canvas.width, _htOption.titleHeight + this._htOption.quietZone);
1355+
_oContext.fillRect(_htOption.quietZone, _htOption.quietZone, _htOption.width, _htOption.titleHeight);
13531356

13541357
_oContext.font = _htOption.titleFont;
13551358
_oContext.fillStyle = _htOption.titleColor;

index.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)