Animates changing the viewport bounds and the zoom factor for a CanvasComponent.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.ViewportAnimation
See Also
Constructors
Creates a new instance of ViewportAnimation.
Parameters
A map of options to pass to the method.
- canvas - CanvasComponent
- The canvas control.
- targetBounds - Rect
- The target world bounds for the animation.
- preferredDuration - TimeSpan
- The preferred duration. 1 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.
- 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.
- targetViewMargins - Insets
The margins in view coordinate dimensions to use at the target zoom level. This option sets the targetViewMargins property on the created object.
Properties
Gets or sets whether to respect the viewportLimiter of the CanvasComponent whose viewport is animated.
Remarks
false
.Gets or sets the maximum zoom level to use after the animation.
Remarks
Gets or sets the preferred duration of the animation.
Implements
Gets or sets the scroll bar visibility that will be used during the animation.
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)
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
Effectively applies the center point value.
Effectively applies the view point value.
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.
See Also
Defined in
Initializes this animation.