Animates changing the viewport bounds and the zoom factor for a CanvasComponent.
Type Details
- yFiles module
- view
Constructors
Creates a new instance of ViewportAnimation.
Parameters
A map of options to pass to the method.
- canvasComponent - CanvasComponent
- The canvas control.
- target - Rect
- The target world bounds for the animation.
- preferredDuration - TimeSpan
- The preferred duration. One second if omitted.
- considerViewportLimiter - boolean
- Whether to respect the viewportLimiter of the CanvasComponent whose viewport is animated. This option sets the considerViewportLimiter property on the created object.
- viewportLimitingMode - ViewportLimitingMode
- The mode of the viewport limiting if considerViewportLimiter is
true
. This option sets the viewportLimitingMode property on the created object. - maximumTargetZoom - number
- The maximum zoom level to use after the animation. This option sets the maximumTargetZoom property on the created object.
- scrollBarVisibility - ScrollBarVisibility
- The scroll bar visibility that will be used during the animation. This option sets the scrollBarVisibility property on the created object.
- targetMargins - Insets
- The margins in view coordinate dimensions to use at the target zoom level. This option sets the targetMargins property on the created object.
Properties
Gets or sets whether to respect the viewportLimiter of the CanvasComponent whose viewport is animated.
Remarks
false
.Property Value
Gets or sets the maximum zoom level to use after the animation.
Gets or sets the preferred duration of the animation.
Implements
Gets or sets the scroll bar visibility that will be used during the animation.
Property Value
hidden
.Gets or sets the target world bounds.
Gets or sets the margins in view coordinate dimensions to use at the target zoom level.
Remarks
(0,0,0,0)
Property Value
Gets or sets the mode of the viewport limiting if considerViewportLimiter is true
.
Remarks
Methods
Does the animation according to the relative animation time.
Remarks
Parameters
A map of options to pass to the method.
- time - number
- The animation time in [0,1].
Implements
Cleans up after the animation.
Implements
Creates a delayed animation instance from this instance.
Remarks
delay
longer than the existing one.Parameters
A map of options to pass to the method.
- delay - TimeSpan
- The delay to wait before the provided animation starts.
Returns
- ↪IAnimation
- A new animation that will first wait before the animation starts.
Defined in
Creates an eased animation for the given base animation.
Remarks
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
A map of options to pass to the method.
- 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.
Returns
- ↪IAnimation
- The newly created IAnimation.
Defined in
Initializes this animation.