Function calculateTextDimensions
- calculateTextDimensions(
parentElement: Element,
text: string,
customOptions?: PartialWithUndefined<
{
debug: boolean;
errorMessage: string;
timeout: Partial<Record<DurationUnit, undefined | number>>;
},
>,
): 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.