Update getTextSize.ts

This commit is contained in:
Steve Ruiz 2022-02-24 21:41:08 +00:00
parent ae49e85380
commit 95ac56db76

View file

@ -52,6 +52,8 @@ export function getTextLabelSize(text: string, font: string) {
return [10, 10]
}
if (!melm.parent) document.body.appendChild(melm)
if (text === prevText && font === prevFont) {
return prevSize
}