initialAnimationStyle property
EnumValue
get
initialAnimationStyle
Gets or sets the initial animation style that is set up by the #defaultAnimation. This can be AnimationManager.Default, AnimationManager.AnimateLocations, or AnimationManager.None.
- If set to AnimationManager.Default, the initial animation will "fade up" the Diagram's contents by animating the Diagram#position and Diagram#opacity.
- If set to AnimationManager.AnimateLocations, the initial animation will animate Part locations from
(0, 0)
to their values, as GoJS 2.0 and prior do. - If set to AnimationManager.None, no initial animation will happen by default,
which this allows you to specify your own initial animation by defining a
"InitialAnimationStarting"
DiagramEvent listener with Diagram#addDiagramListener.
An example custom initial animation, which zooms the Diagram into view:
myDiagram.animationManager.initialAnimationStyle = go.AnimationManager.None;
myDiagram.addDiagramListener('InitialAnimationStarting', e => {
var animation = e.subject.defaultAnimation;
animation.easing = go.Animation.EaseOutExpo;
animation.duration = 900;
animation.add(e.diagram, 'scale', 0.1, 1);
animation.add(e.diagram, 'opacity', 0, 1);
});
Implementation
_i3.EnumValue get initialAnimationStyle => _i4.getProperty(
this,
'initialAnimationStyle',
);
set
initialAnimationStyle
(EnumValue value)
Implementation
set initialAnimationStyle(_i3.EnumValue value) {
_i4.setProperty(
this,
'initialAnimationStyle',
value,
);
}