scale property
Gets or sets the scale transform of this Diagram. Value must be a positive number. The default value is 1. Any new value will be coerced to be between #minScale and #maxScale.
Scale can automatically be set by the #autoScale property. There are also #initialScale and #initialAutoScale for setting the scale on (re)initialization of a Diagram.
Setting this property does not notify about any changed event. However you can listen with #addDiagramListener for a DiagramEvent with the name "ViewportBoundsChanged".
If you set this property any replacement of the #model will result in a layout and a computation of new #documentBounds, which in turn may cause the diagram to be scrolled and zoomed, depending on various Diagram properties named "initial...". You may want to set #initialScale instead of setting this property around the time that you are loading a model.
Implementation
_i2.num get scale => _i4.getProperty(
this,
'scale',
);
Implementation
set scale(_i2.num value) {
_i4.setProperty(
this,
'scale',
value,
);
}