Skip to content
Snippets Groups Projects
Commit c568e0d8 authored by matograine's avatar matograine
Browse files

write URL horizontally on the bottom

parent ebe8544c
Branches
Tags 0.10.1
No related merge requests found
......@@ -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()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment