From c568e0d81a525eb74a9eb9232ec67d208d08805f Mon Sep 17 00:00:00 2001
From: matograine <tom.ngr@zaclys.net>
Date: Sun, 11 Jul 2021 15:44:34 +0200
Subject: [PATCH] write URL horizontally on the bottom

---
 index.html | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/index.html b/index.html
index 4c0481c..04575d5 100644
--- a/index.html
+++ b/index.html
@@ -368,14 +368,12 @@
           if (isCard === false) {
             ctx.font = PUBKEY_URI_FONT;
             address = document.baseURI;
-            let metrics = ctx.measureText(address);
-            let addressWidth = metrics.width;
-            // write URI on the right side
             ctx.save()
-            ctx.translate(CANVAS_WIDTH - MARGIN_CANVAS, CANVAS_HEIGHT - MARGIN_CANVAS)
-            ctx.rotate(-Math.PI/2);
+            xPosURL = CANVAS_WIDTH - MARGIN_CANVAS;
+            yPosURL = yPosPubkey;
             ctx.fillStyle = "grey";
-            ctx.fillText (address, 0, 0);
+	    ctx.textAlign = "end";
+            ctx.fillText (address, xPosURL, yPosURL);
             ctx.restore()
           }
 
-- 
GitLab