Skip to content

Commit

Permalink
added pos absolute to fix percy
Browse files Browse the repository at this point in the history
  • Loading branch information
rafawendel committed Oct 30, 2020
1 parent 5b28e30 commit 4daf1d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/app/lib/calculateTextWidth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const canvas = document.createElement("canvas");
canvas.style.display = "none";
canvas.style.position = "absolute";
canvas.style.top = "0";
canvas.style.left = "0";
document.body.appendChild(canvas);

export function calculateTextWidth(text: string, container = document.body) {
Expand Down

0 comments on commit 4daf1d4

Please sign in to comment.