Function calculateTextDimensions
- calculateTextDimensions(parentElement, text, customOptions?): Promise<Dimensions>
Parameters
- parentElement: Element
- text: string
Optional
customOptions: PartialWithUndefined<{
debug: boolean;
errorMessage: string;
timeout: Partial<Record<DurationUnit, undefined | number>>;
}>
Calculate the dimensions needed for an element's text. This is a relatively expensive operation, so it should not be called excessively.