Update getTextSize.ts
This commit is contained in:
parent
ae49e85380
commit
95ac56db76
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue