From 5fa88fc750f6500c977ab841533989351a00dc76 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Mon, 5 Dec 2022 02:06:23 +0530 Subject: [PATCH] minor UX change --- index.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index e19fabb..5697d8f 100644 --- a/index.html +++ b/index.html @@ -359,13 +359,15 @@ canvas.getContext('2d').drawImage(img, 0, 0); const imgData = canvas.toDataURL('image/png'); certPdf.addImage(imgData, 'PNG', 620, 670, 160, 160); - certPdf.save(`RanchiMall ${certType.toLowerCase()} for ${name}.pdf`); - if (downloadButton) { - downloadButton.disabled = false; - downloadButton.lastChild.textContent = "Download"; - } + certPdf.save(`RanchiMall ${certType.toLowerCase()} for ${name}.pdf`, { returnPromise: true }).then(() => { + if (downloadButton) { + downloadButton.disabled = false; + downloadButton.lastChild.textContent = "Download"; + } + }); }; } + } floGlobals.validCerts = new Map()