Class AnimationManager

AnimationManager handles animations in a Diagram. Each Diagram has one, Diagram.animationManager.Layouts, Group expansion and Tree expansion automatically start animations.

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

When an animations begins it raises the "AnimationStarting" diagram event,upon completion it raises the "AnimationFinished" diagram event.

Animation 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 programatically with the method AnimationManager.stopAnimation.

Constructor Summary Details

Name Description
AnimationManager()

You do not normally need to create an instance of this classbecause one already exists as the Diagram.animationManager, which you can modify.

Properties Summary Details

Name, Value Type Description
duration
{number}

Gets or sets the duration for animations, in milliseconds.More... The default value is 600 milliseconds.The value must be a number greater than or equal to 1.Setting this property does not raise any events.

See also:
isAnimating
{boolean}

This read-only property is true when the animation manger is currently animating.More...

This value cannot be set, but animation can be stopped by calling stopAnimation,and it can be prevented by setting isEnabled.

isEnabled
{boolean}

Gets or sets whether this AnimationManager operates.More...

The default value is true.Setting this to false does not stop an animation, it only stops future animations.To stop any ongoing animation, use stopAnimation.Setting this property does not raise any events.

isInitial
{boolean} 1.6

Gets or sets whether an animation is performed on an initial layout.More...

The default value is true.Changing the value does not affect any ongoing animation.Setting this property does not raise any events.

isTicking
{boolean}

This read-only property is true when the animation manger is in the middle of an animation tick.More... Animation only operates on GraphObjects during ticks, but code outside of AnimationManager's control may execute between ticks.

isTicking can only be true when isAnimating is also true.

This value cannot be set.

Method Summary Details

Name, Return Type Description
stopAnimation()

Stops any running animation and updates the Diagram to its final state.More...

If an animation was about to begin, it is cancelled.