mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-02-18 13:29:36 +01:00
fix calculating text width for indented text (#930)
This commit is contained in:
parent
450a024f5c
commit
c85315650f
@ -63,7 +63,7 @@ export function measureText(text: string, font: string) {
|
||||
const line = document.createElement("div");
|
||||
const body = document.body;
|
||||
line.style.position = "absolute";
|
||||
line.style.whiteSpace = "nowrap";
|
||||
line.style.whiteSpace = "pre";
|
||||
line.style.font = font;
|
||||
body.appendChild(line);
|
||||
// Now we can measure width and height of the letter
|
||||
|
Loading…
Reference in New Issue
Block a user