Skip to content

Commit

Permalink
Fix Safari layout issue (pixijs-userland#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
littleboarx authored Dec 1, 2022
1 parent 4d00134 commit 2e79d72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ export class HTMLText extends Sprite

// Measure the contents
document.body.appendChild(dom);
const { width, height } = dom.getBoundingClientRect();
const { width: _width, height: _height } = dom.getBoundingClientRect();
const width = Math.ceil(_width);
const height = Math.ceil(_height);

document.body.removeChild(dom);

Expand Down

0 comments on commit 2e79d72

Please sign in to comment.