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
-
activeAnimations
↔ Set<
Animation> -
Available on AnimationManager, provided by the AnimationManager$Typings extension
Gets the set of currently animating Animations being managed by this AnimationManager, including any running #defaultAnimation.getter/setter pair - defaultAnimation ↔ Animation
-
Available on AnimationManager, provided by the AnimationManager$Typings extension
This read-only property gets the Animation that carries out the default built-in GoJS animations. This animation is usually only referenced to modify default animation properties, such as the Animation#easing or Animation#duration.getter/setter pair - duration ↔ num
-
Available on AnimationManager, provided by the AnimationManager$Typings extension
Gets or sets the default duration, in milliseconds, used as the duration for the #defaultAnimation and for animations that have their Animation#duration set toNaN
.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- initialAnimationStyle ↔ EnumValue
-
Available on AnimationManager, provided by the AnimationManager$Typings extension
Gets or sets the initial animation style that is set up by the #defaultAnimation. This can be AnimationManager.Default, AnimationManager.AnimateLocations, or AnimationManager.None.getter/setter pair - isAnimating ↔ bool
-
Available on AnimationManager, provided by the AnimationManager$Typings extension
This read-only property is true when the animation manager is currently animating any animation, including the #defaultAnimation.getter/setter pair - isEnabled ↔ bool
-
Available on AnimationManager, provided by the AnimationManager$Typings extension
Gets or sets whether this AnimationManager operates.getter/setter pair - isInitial ↔ bool
-
Available on AnimationManager, provided by the AnimationManager$Typings extension
Gets or sets whether a default animation is performed on an initial layout.getter/setter pair - isTicking ↔ bool
-
Available on AnimationManager, provided by the AnimationManager$Typings extension
This read-only property is true when the animation manager is in the middle of an animation tick. Animation only operates on GraphObjects during ticks, but code outside of AnimationManager's control may execute between ticks.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canStart(
String reason) → bool -
Available on AnimationManager, provided by the AnimationManager$Typings extension
This method is passed the reason a default animation is to begin, and must return true or false based on whether or not the animation is to be allowed. Returning true means the animation will occur, returning false will stop the animation's setup. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stopAnimation(
[bool? stopsAllAnimations]) → void -
Available on AnimationManager, provided by the AnimationManager$Typings extension
Stops the #defaultAnimation and updates the Diagram to its final state. -
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.