E

ViewportLimitingMode

Specifies the mode used by the viewport limiter in the limitViewport call.

Remarks

Callers of limitViewport use this to communicate their intent and the purpose of the limiting.

Members

No filters for this type

Constants

When the CanvasComponent was resized externally, which affects the viewport and possibly requires calculating new limits or adjusting the viewport.
When the bounds or contentBounds changed to give the limiter a chance to react to the new bounds.
Potentially larger navigation steps towards a known or anticipated target, like keyboard navigation, "zoom to item", or for calculating scrollbar large increments.
This will be used to calculate end points for an animated pan/page scroll, too, but not the intermediate steps.
static
Small incremental steps which only affect the viewpoint from the current location like a swipe, auto-drag, or scrollbar dragging.
Small incremental steps from the current location and zoom level, like pinch or mouse wheel, but also two finger drag which zooms and potentially pans at the same time.
Calculating a specific target viewport regardless of the current viewport.
E.g. to compute the limited target bounds for a viewport animation during layout, or for "fit content". Similar to interactive navigation, but not triggered by an immediate user gesture that directly interacts with the viewport. Typically used to calculate the end point of an animation, where both viewpoint and zoom change.
static

Static Methods

Converts the given argument to an enum constant of this enum type.
Most notably, this method can convert an enum constant's name into the enum constant itself.
static

Parameters

value: ViewportLimitingMode
The value to convert to an enum constant.

Return Value

ViewportLimitingMode
The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
static

Parameters

value: ViewportLimitingMode
The numeric value of an enum constant.

Return Value

string
The name of the enum constant.

Throws

Exception ({ name: 'Error' })
If this type is a flags enums, and the provided value doesn't correspond to a single enum constant, or if this enum type contains no constant of the given numeric value.