• Computes width of the text in pixels, based on given parent control. If no parent control is set, document.body is used.

    Parameters

    • txt: any

      Source text.

    • Optional parentEl: any

      Parent control. The default is body element.

    Returns any

    Method

    getTextWidth