Specifies how the zoom level affects the rendering of styles that are used as selection, highlight or focus indicator.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.StyleDecorationZoomPolicy
See Also
Constants
Uses WORLD_COORDINATES rendering for zoom level ≥ 1 and VIEW_COORDINATES rendering for zoom level < 1.
Remarks
While the decoration is rendered in view coordinates, its actual bounds are still in world coordinates. This is useful for e.g. highlight decorations where stroke size and padding of the decoration should be clearly visible at larger zoom levels. The bounds of the decoration, on the other hand, should still fit the decorated item's bounds.
Uses WORLD_COORDINATES rendering for zoom level ≥ 1 and VIEW_COORDINATES rendering for zoom level < 1, but in the latter case, the visual does not scale down below its initial size.
Remarks
This ensures that the style decorations remain clearly visible and do not become too small to discern when the user zooms out. The bounds of the decoration, on the other hand, exceed the decorated item's bounds, which may result in visual overlaps with other items.
The visual is rendered in intermediate coordinates (the same as view coordinates if projection is not used) and doesn't scale with the zoom level.
Remarks
This is similar to handles, for example, which also don't scale with the zoom level.
If a projection is set, this is really the intermediate coordinate system, despite the name of this constant. This won't make a difference to most developers, so the name remained the same to prevent an incompatible API change.
Static Methods
Converts the argument to StyleDecorationZoomPolicy.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - StyleDecorationZoomPolicy
- The value to convert to StyleDecorationZoomPolicy.
Returns
- ↪StyleDecorationZoomPolicy
- Either
value
if it is already a StyleDecorationZoomPolicy or an appropriate converted value.