From 2b7a0f7d0649d080e50dc669b49f986f3da5c769 Mon Sep 17 00:00:00 2001 From: GitHub Actions <> Date: Mon, 17 Jul 2023 05:02:07 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20docs=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/js/signature_pad.umd.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/js/signature_pad.umd.js b/docs/js/signature_pad.umd.js index ec170602..aa783395 100644 --- a/docs/js/signature_pad.umd.js +++ b/docs/js/signature_pad.umd.js @@ -1,5 +1,5 @@ /*! - * Signature Pad v4.1.5 | https://github.com/szimek/signature_pad + * Signature Pad v4.1.6 | https://github.com/szimek/signature_pad * (c) 2023 Szymon Nowak | Released under the MIT license */ @@ -234,6 +234,7 @@ this.dotSize = options.dotSize || 0; this.penColor = options.penColor || 'black'; this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)'; + this.compositeOperation = options.compositeOperation || 'source-over'; this._strokeMoveUpdate = this.throttle ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle) : SignaturePad.prototype._strokeUpdate; @@ -336,6 +337,9 @@ velocityFilterWeight: group && 'velocityFilterWeight' in group ? group.velocityFilterWeight : this.velocityFilterWeight, + compositeOperation: group && 'compositeOperation' in group + ? group.compositeOperation + : this.compositeOperation, }; } _strokeBegin(event) { @@ -410,6 +414,7 @@ this._lastVelocity = 0; this._lastWidth = (options.minWidth + options.maxWidth) / 2; this._ctx.fillStyle = options.penColor; + this._ctx.globalCompositeOperation = options.compositeOperation; } _createPoint(x, y, pressure) { const rect = this.canvas.getBoundingClientRect();