mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
Use innerText
instead of innerHTML
when measuring text (#312)
This commit is contained in:
parent
f465121f9b
commit
76467073f2
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ export function measureText(text: string, font: string) {
|
|||
line.style.font = font;
|
||||
body.appendChild(line);
|
||||
// Now we can measure width and height of the letter
|
||||
line.innerHTML = text;
|
||||
line.innerText = text;
|
||||
const width = line.offsetWidth;
|
||||
const height = line.offsetHeight;
|
||||
// Now creating 1px sized item that will be aligned to baseline
|
||||
|
|
Loading…
Add table
Reference in a new issue