autoScale property

EnumValue get autoScale

Gets or sets the autoScale behavior of the Diagram, controlling whether or not the Diagram's bounds automatically scale to fit the view.

The only accepted values are the constant properties of Diagram, Diagram.None, Diagram.Uniform, or Diagram.UniformToFill. Setting this will change the Diagram's Diagram#scale and Diagram#position, if appropriate.

The default value is Diagram.None - the scale and position are not automatically adjusted according to the area covered by the document. When the value is not None, any value for #initialAutoScale or #initialScale is ignored.

When autoScale is set to a non-Diagram.None value, the user will not be able to zoom, and setting #scale will do nothing. If you only want to scale automatically on initialization, use #initialAutoScale.

Setting this property to Diagram.Uniform is basically the same as calling #zoomToFit all the time, or just disabling interactive zooming.

Note that depending on the values of #maxScale and #minScale, the actual value for #scale might be limited.

Implementation

_i3.EnumValue get autoScale => _i4.getProperty(
      this,
      'autoScale',
    );
set autoScale (EnumValue value)

Implementation

set autoScale(_i3.EnumValue value) {
  _i4.setProperty(
    this,
    'autoScale',
    value,
  );
}