Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

fix safari layout #29

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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