isViewportSized property
Gets or sets whether this layout depends on the Diagram#viewportBounds's size. If set to true, the layout will invalidate when the Diagram's viewport changes size. This only applies to diagram layouts, not to group layouts, and only when Diagram#autoScale is set to Diagram.None.
The default value is false. Setting this property to true will invalidate this layout.
It is possible that a viewport-sized layout will trigger the Diagram to require scrollbars, which modifies the Diagram#viewportBounds, which will in turn trigger another layout. This is uncommon, but possible with GridLayout if the results require a vertical scrollbar, and that vertical scrollbar shrinks the viewport width enough that a grid column can no longer fit. When designing custom layouts, one should be careful that this behavior does not result in an infinite loop.
Implementation
_i2.bool get isViewportSized => _i4.getProperty(
this,
'isViewportSized',
);
Implementation
set isViewportSized(_i2.bool value) {
_i4.setProperty(
this,
'isViewportSized',
value,
);
}