From ba2e3c208b9b01b3cdcfce9ac59072bbdcc1d6c5 Mon Sep 17 00:00:00 2001 From: Udo Klimaschewski Date: Wed, 22 Feb 2017 11:01:07 +0100 Subject: [PATCH] Added hideCanvasLine option to hide the signature line --- src/jSignature.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jSignature.js b/src/jSignature.js index 3709d4a..929a887 100644 --- a/src/jSignature.js +++ b/src/jSignature.js @@ -731,6 +731,7 @@ function jSignatureClass(parent, options, instanceExtensions) { ,'minFatFingerCompensation' : -10 ,'showUndoButton': false ,'data': [] + ,'hideCanvasLine' : false } $.extend(settings, getColors($parent)) @@ -933,6 +934,7 @@ function jSignatureClass(parent, options, instanceExtensions) { return this } // end of initBase + //========================================================================= // jSignatureClass's methods and supporting fn's @@ -964,7 +966,9 @@ jSignatureClass.prototype.resetCanvas = function(data){ ctx.shadowOffsetX = 0 ctx.shadowOffsetY = 0 var lineoffset = Math.round( ch / 5 ) - basicLine(ctx, lineoffset * 1.5, ch - lineoffset, cw - (lineoffset * 1.5), ch - lineoffset) + if (!settings.hideCanvasLine) { + basicLine(ctx, lineoffset * 1.5, ch - lineoffset, cw - (lineoffset * 1.5), ch - lineoffset) + } ctx.strokeStyle = settings.color if (!isCanvasEmulator){