FloUI.Scrollable.PositionCap (FloUI v0.1.0-alpha.6) View Source
Module for applying limits to a position.
Link to this section Summary
Types
Data structure representing a minimum, or maximum cap which values will be compared against.
The cap can be either a v2/0
or a t:Scenic.Scrollable.Direction.t/0
.
By using a t:Scenic.Scrollable.Direction/0
it is possible to cap a position only for either its x, or its y value.
The settings with which to initialize a t:Scenic.Scrollable.PositionCap.t
.
Both min and max caps are optional, and can be further limited to only the x, or y axes by passing in a t:Scenic.Scrollable.Direction/0
rather than a v2/0
.
A vector 2 in the form of {x, y}
Functions
Initializes a t:Scenic.Scrollable.PositionCap.t/0
according to the provided t:Scenic.Scrollable.PositionCap.settings/0
.
Link to this section Types
Specs
Data structure representing a minimum, or maximum cap which values will be compared against.
The cap can be either a v2/0
or a t:Scenic.Scrollable.Direction.t/0
.
By using a t:Scenic.Scrollable.Direction/0
it is possible to cap a position only for either its x, or its y value.
Specs
The settings with which to initialize a t:Scenic.Scrollable.PositionCap.t
.
Both min and max caps are optional, and can be further limited to only the x, or y axes by passing in a t:Scenic.Scrollable.Direction/0
rather than a v2/0
.
Specs
A struct representing a position cap. Positions in the form of a v2/0
can be compared against, and increased or reduced to the capped values by using the cap/2
function.
Specs
v2() :: Scenic.Scrollable.v2()
A vector 2 in the form of {x, y}