measureTemporaryTextBlock method

TextBlock measureTemporaryTextBlock(
  1. String text
)

This method returns a temporary TextBlock used for measuring text during editing. The TextBlock.text is set to the parameter's value, and the TextBlock is measured with the last available width of the #textBlock.

Text editors can use the GraphObject#measuredBounds and TextBlock#lineCount to determine a reasonable size for their text areas. @param {string} text the text to measure @return {TextBlock} @since 1.7

Implementation

_i3.TextBlock measureTemporaryTextBlock(_i2.String text) => _i4.callMethod(
      this,
      'measureTemporaryTextBlock',
      [text],
    );