remeasureObject method

void remeasureObject(
  1. GraphObject obj
)

Uncommon: Force a given GraphObject to remeasure in the near future. If a PanelLayout is not just measuring elements, but must also modify some of its elements, this must be called on those elements before modifications are made. This prevents the elements from potentially remeasuring the entire visual tree, which would cause an infinite loop.

Normally, panels do not modify the dimensions of their elements. In other words, a Panel would not normally set a property like GraphObject#desiredSize or TextBlock#text or Shape#geometry on any of its elements. Some custom panels may wish to do this, especially if the programmer knows it will not affect the size of any containing Panel.

Calling this method before changing a property preempts the remeasuring of any containing Panels, ensuring only the GraphObject and its own child elements will be remeasured.

This is used in PanelLayout "Viewbox" on its one element. It modifies that element's GraphObject#scale and is certain that will not affect Panels up the visual tree. @since 2.2 @param {GraphObject} obj GraphObject to be invalidated.

Implementation

void remeasureObject(_i3.GraphObject obj) {
  _i4.callMethod(
    this,
    'remeasureObject',
    [obj],
  );
}