Skip to content

Commit d2589d0

Browse files
Fix auto color always be changed back to true
1 parent b65f5eb commit d2589d0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,12 +1100,9 @@ Drawing.prototype.draw = function(oQRCode) {
11001100

11011101
this._canvas.width = this._htOption.width + this._htOption.quietZone * 2;
11021102
this._canvas.height = this._htOption.height + this._htOption.quietZone * 2;
1103-
1104-
this._htOption.autoColor=true;
11051103

11061104
var autoColorDark="rgba(0, 0, 0, .6)";
11071105
var autoColorLight="rgba(255, 255, 255, .7)";
1108-
var notAutoColorLight="rgba(0,0,0,0)";
11091106
// JPG
11101107
if(_htOption.format=='JPG' ){
11111108

@@ -1214,8 +1211,7 @@ Drawing.prototype.draw = function(oQRCode) {
12141211
_oContext.strokeStyle = bIsDark ? autoColorDark : autoColorLight;
12151212
_oContext.fillStyle = bIsDark ? autoColorDark : autoColorLight;
12161213
} else {
1217-
// _oContext.strokeStyle = bIsDark ? _htOption.colorDark : notAutoColorLight;
1218-
_oContext.fillStyle = bIsDark ? _htOption.colorDark : notAutoColorLight;
1214+
_oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
12191215
_oContext.strokeStyle = _oContext.fillStyle;
12201216
}
12211217
_oContext.fillRect(nLeft + nWidth * (1 - nowDotScale) / 2, _htOption.titleHeight + nTop + nHeight * (1 -

0 commit comments

Comments
 (0)