Viewport Limiter
The ViewportLimiter limits the interactive movement of the viewport. This
helps to navigate the canvas without losing the content.
The ViewportLimiter#bounds (or effective viewport limiter area) are
calculated as the union of two rectangles: The
ViewportLimiter#viewportContentMargins, which act like insets on the graph
component, and the ViewportLimiter.minimumViewportContentRatio, which defines which
percentage of the viewport is used for limiting.
Things to Try
-
Pan the graph with a pointer or touch device. Try to move the graph out of the viewport.
Observe how the Viewport Limiter prevents moving the graph completely outside.
-
Change the limiting policy and the settings in the property panel on the right-hand
side. Move the graph again to see how the different settings affect the viewport
limiting.
Strict Bounds Containment
If enabled, the viewport only shows elements inside the bounds of the ViewportLimiter. No
area outside the bounds should ever be visible.
If disabled, it is possible to see parts outside the bounds, but the limiter tries to
minimize the amount of possible space outside.
See the sources for details.