Classes
Methods
decrementPosition(dim) → {boolean}
Decrement the current position along the provided dim.
Name | Type | Description |
---|---|---|
dim | number | The direction in which to decrement. |
True if possible and in bounds.
- Type:
- boolean
decrementPositionAlongScroll() → {boolean}
Decrement the current position along the scroll dimension.
True if possible and in bounds.
- Type:
- boolean
getCurrentIndex() → {Index}
Get the current index.
The current index.
- Type:
- Index
getCurrentPosition() → {Point}
Get the current position.
The current position.
- Type:
- Point
getCurrentPositionAtDimValue(dim, value) → {Point}
Get the current position updated at the provided dimension index with the input value.
Name | Type | Description |
---|---|---|
dim | number | The dimension. |
value | number | The value to used at dimension index. |
The position.
- Type:
- Point
getCurrentPositionAtScrollValue(value) → {Point}
Get the current position updated at scroll index with the input value.
Name | Type | Description |
---|---|---|
value | number | The value to use at scroll index. |
The position.
- Type:
- Point
getCurrentPositionDimValue(dim) → {number}
Get the value at dimension index for the current position.
Name | Type | Description |
---|---|---|
dim | number | The dimension. |
The value.
- Type:
- number
getCurrentPositionScrollValue() → {number}
Get the value at scroll index for the current position.
The value.
- Type:
- number
getDecrementPosition(dim) → {Point}
Get the current position decremented in the input direction.
Name | Type | Description |
---|---|---|
dim | number | The direction in which to decrement. |
The resulting point.
- Type:
- Point
getGeometry() → {Geometry}
Get the geometry.
The geometry.
- Type:
- Geometry
getIncrementPosition(dim) → {Point}
Get the current position incremented in the input direction.
Name | Type | Description |
---|---|---|
dim | number | The direction in which to increment. |
The resulting point.
- Type:
- Point
getMaximumDimValue(dim) → {number}
Get the maximum dimension value.
Name | Type | Description |
---|---|---|
dim | number | The dimension. |
The maximum value.
- Type:
- number
getMaximumScrollValue() → {number}
Get the maximum scroll value.
The maximum value.
- Type:
- number
getScrollDimIndex() → {number}
Get the scroll index.
The scroll index.
- Type:
- number
incrementPosition(dim) → {boolean}
Increment the current position along the provided dim.
Name | Type | Description |
---|---|---|
dim | number | The direction in which to increment. |
True if possible and in bounds.
- Type:
- boolean
incrementPositionAlongScroll() → {boolean}
Increment the current position along the scroll dimension.
True if possible and in bounds.
- Type:
- boolean
isPositionInBounds(position) → {boolean}
Check if the current position (default) or the provided position is in bounds.
Name | Type | Description |
---|---|---|
position | Point | Optional position. |
True is the position is in bounds.
- Type:
- boolean
merge(rhs)
Merge with another helper.
Name | Type | Description |
---|---|---|
rhs | PositionHelper | The helper to merge with this one. |
setCurrentPosition(position, silentopt) → {boolean}
Set the current position.
Name | Type | Attributes | Description |
---|---|---|---|
position | Point | The position. | |
silent | boolean | <optional> | Flag to fire event or not. |
True if possible and in bounds.
- Type:
- boolean
setCurrentPositionSafe(position, silentopt) → {boolean}
Set the current position only if it is in the geometry bounds.
Name | Type | Attributes | Description |
---|---|---|---|
position | Point | The position. | |
silent | boolean | <optional> | Flag to fire event or not. |
True if possible and in bounds.
- Type:
- boolean