summaryrefslogtreecommitdiff
path: root/addons/web/static/lib
diff options
context:
space:
mode:
authorLaurent Stukkens (LTU) <ltu@odoo.com>2020-03-27 10:08:43 +0000
committerLaurent Stukkens (LTU) <ltu@odoo.com>2020-05-08 07:56:09 +0000
commit68584351e4be49b0b0085e582271c655bdfb1585 (patch)
treee95d377c568aee8e44432b2be41a29b794660153 /addons/web/static/lib
parent7c00503008d9e5e9e17e62bfefc267ce87aa78d1 (diff)
[IMP] web: Allow hide/show stroke in signature
In the sign application, it appeared that when using the default signature in a signature SignItem that was higher the stroke at the bottom was doubbled. This was caused by the fact that the bottom stroke is always added to the template and that the default signature image had it already. In order to solve this, we have added a setting 'show-stroke' that allows controlling the stroke presence in the signature. Task Id 2216067 Closes #48529 Related odoo/enterprise#9538 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/lib')
-rw-r--r--addons/web/static/lib/jSignature/jSignatureCustom.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/lib/jSignature/jSignatureCustom.js b/addons/web/static/lib/jSignature/jSignatureCustom.js
index 6ccd2af79a3..eb053a7bcfc 100644
--- a/addons/web/static/lib/jSignature/jSignatureCustom.js
+++ b/addons/web/static/lib/jSignature/jSignatureCustom.js
@@ -736,6 +736,7 @@ function jSignatureClass(parent, options, instanceExtensions) {
,'color' : '#000'
,'background-color': '#fff'
,'decor-color': '#eee'
+ ,'show-stroke': true
,'lineWidth' : 0
,'minFatFingerCompensation' : -10
,'showUndoButton': false
@@ -977,7 +978,7 @@ jSignatureClass.prototype.resetCanvas = function(data, dontClear){
ctx.lineCap = ctx.lineJoin = "round";
// signature line
- if (null != settings['decor-color']) {
+ if (null != settings['decor-color'] && settings['show-stroke']) {
ctx.strokeStyle = settings['decor-color'];
ctx.shadowOffsetX = 0;
ctx.shadowOffsetY = 0;