Skip to content

Commit e810cb2

Browse files
committed
Fixed titleTop and subtitleTop option invalid issue
New version 3.5.2 release! # fixed titleTop and subtitleTop option invalid issue
1 parent bfd4d25 commit e810cb2

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
2-
* EasyQRCodeJS
2+
* EasyQRCodeJS-NodeJS
33
*
44
* NodeJS QRCode generator. Save image to file. Support Dot style, Logo, Background image, Colorful, Title, etc.(Running without DOM on server side)
55
*
6-
* Version 3.5.1
6+
* Version 3.5.2
77
*
88
* @author [ inthinkcolor@gmail.com ]
99
*
@@ -1241,13 +1241,13 @@ Drawing.prototype.draw = function(oQRCode) {
12411241
_oContext.font = _htOption.titleFont;
12421242
_oContext.fillStyle = _htOption.titleColor;
12431243
_oContext.textAlign = 'center';
1244-
_oContext.fillText(_htOption.title, t._canvas.width / 2, this._htOption.quietZone+30);
1244+
_oContext.fillText(_htOption.title, t._canvas.width / 2, this._htOption.quietZone+this._htOption.titleTop);
12451245
}
12461246

12471247
if (_htOption.subTitle) {
12481248
_oContext.font = _htOption.subTitleFont;
12491249
_oContext.fillStyle = _htOption.subTitleColor;
1250-
_oContext.fillText(_htOption.subTitle, t._canvas.width / 2, this._htOption.quietZone+60);
1250+
_oContext.fillText(_htOption.subTitle, t._canvas.width / 2, this._htOption.quietZone+this._htOption.subTitleTop);
12511251
}
12521252

12531253
if (_htOption.logo) {
@@ -1427,7 +1427,7 @@ function QRCode(vOption) {
14271427
subTitle: "",
14281428
subTitleFont: "14px Arial",
14291429
subTitleColor: "#4F4F4F",
1430-
subTitleTop: 0, // draws y coordinates. default is 0
1430+
subTitleTop: 60, // draws y coordinates. default is 0
14311431

14321432
logo: undefined,
14331433
logoWidth: undefined,

0 commit comments

Comments
 (0)