C

ViewportAnimation

Animates changing the viewport bounds and the zoom factor for a CanvasComponent.
ImplementsInheritance Hierarchy

Members

Show:

Constructors

Creates a new instance of ViewportAnimation.

Parameters

canvasComponent: CanvasComponent
The canvas control.
target: Rect
The target world bounds for the animation.
preferredDuration: TimeSpan
The preferred duration. One second if omitted.

Properties

Gets or sets whether to respect the viewportLimiter of the CanvasComponent whose viewport is animated.
Default is false.
final

Property Value

true if the viewportLimiter should be considered, otherwise false.
Gets or sets the maximum zoom level to use after the animation.
The default is Number.POSITIVE_INFINITY.
final

Property Value

The maximum target zoom.
Gets or sets the preferred duration of the animation.
conversionfinal
Gets or sets the scroll bar visibility that will be used during the animation.
conversionfinal

Property Value

The scroll bar visibility to use during animation. The default is hidden.
Gets or sets the target world bounds.
conversionfinal
Gets or sets the margins in view coordinate dimensions to use at the target zoom level.
The default is (0,0,0,0)
conversionfinal

Property Value

The target margins in view coordinates.
Gets or sets the mode of the viewport limiting if considerViewportLimiter is true.
conversionfinal

Methods

Does the animation according to the relative animation time.
The animation starts with the time 0 and ends with time 1.

Parameters

time: number
The animation time in [0,1].
Effectively applies the center point value.
protected

Parameters

focus: Point
The point to set as center.
Effectively applies the viewpoint value.
protected

Parameters

focus: Point
The point to set the viewPoint to.
Effectively applies the zoom value.
protected

Parameters

value: number
The zoom value to apply.
Cleans up and cancels this viewport animation so that subsequent calls to animate or cleanUp won't affect the viewport anymore.
Cleans up after the animation.
Creates a delayed animation instance from this instance.
The resulting animation will have a preferred duration that is delay longer than the existing one.

Parameters

delay: TimeSpan
The delay to wait before the provided animation starts.

Return Value

IAnimation
A new animation that will first wait before the animation starts.
Creates an eased animation for the given base animation.

The animation speed linearly increases up to a easeIn and linearly decreases from easeOut. Between those two points, the animation speed is constant.

The duration of the ease in and ease out is determined by a mapping [0,1] → [0,1]. The mapping has to be increasing to preserve the order of the frames in the decorated animation. In general, we consider continuously differentiable functions f where integral of f′ equals 1 a suitable choice for the mapping.

Parameters

easeIn?: number
The ratio for the ease-in time [0,1] where 0 is the start of the animation and 1 the end. 0.5 is the default value.
easeOut?: number
The ratio for the ease-out time [0,1] where 0 is the start of the animation and 1 the end. 0.5 is the default value.

Return Value

IAnimation
The newly created IAnimation.

See Also

Developer's Guide
Initializes this animation.
This has to be called once before any calls to animate. An instance of ViewportAnimation can be reused after an animation by setting new target or a new preferredDuration and calling Initialize() again.