AnimationManager class

AnimationManager handles animations in a Diagram. Each Diagram has one, Diagram#animationManager. Setting the Model, performing a Layout, Group expansion and Tree expansion automatically start animations through the #defaultAnimation. Animations can be manually started by creating Animations, which are associated with an AnimationManager.

Animation is enabled by default, setting the #isEnabled property to false will turn off animations for a Diagram.

When the #defaultAnimation begins it raises the "AnimationStarting" Diagram event, upon completion it raises the "AnimationFinished" Diagram event.

The #defaultAnimation, if running, will stop if a new transaction is started, if an undo or redo is called, if a layout is invalidated, or if a model is replaced. When an Animation is stopped, the Diagram immediately finishes the animation and draws the final state. Animations can be stopped programmatically with the methods AnimationManager#stopAnimation or Animation#stop.

Available Extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

AnimationManager([dynamic init])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

animateLocations EnumValue
Used as a value for #initialAnimationStyle. This value will cause initial animations to capture Part locations and animate them from (0, 0) to those location values. This was the default initial animation behavior in GoJS 2.0 and prior. See #initialAnimationStyle for details and examples.
getter/setter pair
default$ EnumValue
Used as the default value for #initialAnimationStyle. The default initial animation style will "fade up" and in the Diagram's contents by animating the Diagram#position and Diagram#opacity. To make the default initial animation behave like GoJS 2.0, set #initialAnimationStyle to AnimationManager.AnimateLocations. To customize the default initial animation, set #initialAnimationStyle to AnimationManager.None and define a "InitialAnimationStarting" DiagramEvent listener with Diagram#addDiagramListener. See #initialAnimationStyle for details and examples.
getter/setter pair
none EnumValue
Used as a value for #initialAnimationStyle. This will turn off the initial animation, but also allows for customizing the initial animation by adding your own properties if you define a "InitialAnimationStarting" listener with Diagram#addDiagramListener. See #initialAnimationStyle for details and examples.
getter/setter pair

Static Methods

defineAnimationEffect(String effectName, void animationFunction(Object, EasingFunction , num, num, Animation, [dynamic, dynamic])) → void
Defines a new named effect to be used in animation, along with a function that tells the AnimationManager how to modify that property.