From 0dfc9b4f0958ae789d95dbb37fd49cc0f168311e Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 12 Dec 2023 16:10:30 +0100 Subject: [PATCH] tweaking signature frame --- EnvelopeGenerator.Web/wwwroot/js/annotation.js | 11 +++-------- EnvelopeGenerator.Web/wwwroot/js/app.js | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/EnvelopeGenerator.Web/wwwroot/js/annotation.js b/EnvelopeGenerator.Web/wwwroot/js/annotation.js index 69b53b63..a0322782 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/annotation.js +++ b/EnvelopeGenerator.Web/wwwroot/js/annotation.js @@ -115,15 +115,9 @@ console.log(receiverSignature) - //canvas.width = width - //canvas.height = height - canvas.width = width * scale canvas.height = height * scale - //canvas.style.width = width * 4 - //canvas.style.height = height * 4 - const ctx = canvas.getContext('2d') // This supposedly makes the lines and text less blurry // See: https://stackoverflow.com/questions/8696631/canvas-drawings-like-lines-are-blurry @@ -133,7 +127,7 @@ ctx.textRendering = "geometricPrecision" const date = new Date() - const dateString = date.toLocaleDateString('de-DE') + const dateString = date.toLocaleString('de-DE') const signatureLength = 100 * scale @@ -157,7 +151,8 @@ ctx.fillStyle = 'black' ctx.font = `${fontSize * scale}px sans-serif` ctx.fillText('Signed by', 30 * scale, 10 * scale) - ctx.fillText(receiverName + ', ' + dateString, 15 * scale, 60 * scale) + ctx.fillText(receiverName, 15 * scale, 60 * scale) + ctx.fillText(dateString, 15 * scale, 70 * scale) return new Promise((resolve) => { canvas.toBlob((blob) => { diff --git a/EnvelopeGenerator.Web/wwwroot/js/app.js b/EnvelopeGenerator.Web/wwwroot/js/app.js index b5d9eb1b..9c6a1f92 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/app.js +++ b/EnvelopeGenerator.Web/wwwroot/js/app.js @@ -109,8 +109,8 @@ class App { if (isFormField === false && isSignature === true) { - const left = annotation.boundingBox.left - 25 - const top = annotation.boundingBox.top - 25 + const left = annotation.boundingBox.left - 20 + const top = annotation.boundingBox.top - 20 const width = 150 const height = 75