viewSize property

Size viewSize

Gets or sets a fixed size in document coordinates to be returned by #viewportBounds. This is typically only set when the Diagram's #div is null. This property is intended to be used in DOM-less environments where there is no Diagram #div expected, to simulate the size of the DIV. Normally, the #viewportBounds is sized by the DIV instead.

By default this is Size(NaN, NaN). If this property is set, its size will always be used to compute the #viewportBounds, even if a #div is also set. It is uncommon to set both this property and a Diagram DIV.

See the intro page on GoJS within Node.js for a usage example.

Implementation

_i3.Size get viewSize => _i4.getProperty(
      this,
      'viewSize',
    );
void viewSize=(Size value)

Implementation

set viewSize(_i3.Size value) {
  _i4.setProperty(
    this,
    'viewSize',
    value,
  );
}