Fades out items for certain zoom levels when rendering in WebGL mode.
Inheritance Hierarchy
Remarks
When set on a WebGL style, instances of this class will fade out items with this style when the zoom level is below lowerThreshold or above upperThreshold.
The transition between the states is animated and can be configured with transitionDuration and transitionEasing.
The behavior can be turned on and off with start and stop. The behavior is initially enabled.
Instances of this class count toward the global animation limits, each instance requiring one animation slot. Therefore, instances should be shared between items and styles.
See Also
API
- zoomVisibilityPolicy, zoomVisibilityPolicy, zoomVisibilityPolicy, zoomVisibilityPolicy, zoomVisibilityPolicy, zoomVisibilityPolicy, zoomVisibilityPolicy, zoomVisibilityPolicy, createFadeAnimation
Demos
- Shows how to achieve a simple level of detail effect by fading in/out labels at a certain zoom value using WebGL rendering.
Members
No filters for this type
Constructors
Instances of this class count toward the global animation limits, each instance requiring one animation slot. Therefore, instances should be shared between items and styles.
Parameters
- lowerThreshold?: number
- Items are visible above this zoom threshold. Defaults to
1. See lowerThreshold. - upperThreshold?: number
- Items are visible below this zoom threshold. Defaults to positive infinity, so items are always visible above the lower threshold. See lowerThreshold.
- transitionDuration?: TimeSpanconversion
- The duration of the fade transition. Defaults to one second. See transitionDuration.
- transitionEasing?: WebGLAnimationEasingconversion
- The easing of the fade transition. Defaults to no easing. See transitionEasing.
Properties
Items are visible if CanvasComponent.zoom is at or above this threshold. Must be zero or positive and lower than upperThreshold. Set to
0 to make items always visible below upperThreshold.readonlyfinal
Gets the transition duration when fading between visible and invisible states.
Gets the transition duration when fading between visible and invisible states.
readonlyfinal
Gets the transition easing when fading between visible and invisible states.
Gets the transition easing when fading between visible and invisible states.
readonlyfinal
Items are visible if CanvasComponent.zoom is below this threshold. Must be zero or positive and higher than lowerThreshold. Set to Number.POSITIVE_INFINITY to make items always visible above lowerThreshold.
readonlyfinal
Methods
If the zoom level is currently outside the visible zoom interval, it fades the items out gradually. The behavior is initially active.
final
Stops the behavior.
Stops the behavior.
If the zoom level is currently outside the visible zoom interval, it fades the items in gradually. When invoked before this instance has been assigned to an item, there will be no transition. This allows to assign this behavior to items in an inactive state before turning it on later.
final