class UIScrollContainer
A view class that represents a container component that allows users to scroll, emitting asynchronous scroll events.
class UIScrollContainer extends UIContainer
Description
A scroll container functions like a regular container component, but allows users to scroll horizontally and/or vertically.
Constructor
- constructor(…content)Creates a new scroll container view object with the provided view content.
Type Members
- type UIScrollContainer.ScrollEvent staticType definition for an event that’s emitted when the user scrolls up, down, left, or right in a UIScrollContainer.
- type UIScrollContainer.ScrollEventData staticThe data structure contained by each UIScrollContainer.ScrollEvent.
Instance Members
- applyViewPreset(preset)Applies the provided preset properties to this object.
- topThresholdVertical threshold (in pixels) until which
UIScrollEvent.atTop
is set, defaults to 0. - bottomThresholdVertical threshold (in pixels) until which
UIScrollEvent.atBottom
is set, defaults to 0. - horizontalThresholdHorizontal threshold (in pixels) until which
UIScrollEvent.atHorizontalStart
orUIScrollEvent.atHorizontalEnd
is set, defaults to 0. - verticalScrollEnabledTrue if vertical scrolling should be enabled if necessary, defaults to true.
- horizontalScrollEnabledTrue if horizontal scrolling should be enabled if necessary, defaults to true.
- scrollTo(yOffset?, xOffset?)Scrolls to the specified pair of vertical and horizontal offset values.
- scrollToTop()Scroll to the top of the scrollable content, if possible.
- scrollToBottom()Scroll to the bottom of the scrollable content, if possible.
Inherited Members
- findViewContent(type)Implementation of View.findViewContent() that searches within this container.
- delegateContentEvent(event, emitDelegate?) protectedDelegates events from content view objects.
- content readonlyThe list of all content view objects.
- layoutOptions related to layout of content components within this container.
- paddingPadding around contained elements, in pixels or CSS length with unit, or an object with separate offset values.
- spacingSpace between components, in pixels or CSS length with unit.
- asyncContentRenderingTrue if content views should be rendered asynchronously.
- allowFocusTrue if this container itself may receive direct input focus.
- allowKeyboardFocusTrue if this container itself may receive input focus using the keyboard (e.g. Tab key).
- hiddenTrue if the component should be hidden from view.
- positionOptions related to the position of this component.
- accessibleRoleWAI-ARIA role for this component, if applicable.
- accessibleLabelWAI-ARIA label text for this component (not tooltip), if applicable.
- requestFocus()Requests input focus on this component.
- requestFocusNext()Requests input focus for the next sibling component.
- requestFocusPrevious()Requests input focus for the previous sibling component.
- render(callback)Triggers asynchronous rendering for this component, and all contained components, if any.
- lastRenderOutputLast rendered output, if any; set by the UI component renderer.
- emit(event)Emits an event, immediately calling all event handlers.
- emitChange(name?, data?)Emits a change event, an instance of ManagedChangeEvent.
- listen(handler)Adds a handler for all events emitted by this object.
- isUnlinked()Returns true if the object has been unlinked.
- unlink()Unlinks this managed object.
- beforeUnlink() protectedA method that’s called immediately before unlinking an object, can be overridden.
- attach(target, observer?) protectedAttaches the provided managed object to this object.
- autoAttach(propertyName, observer?) protectedObserves a property, so that any object assigned to it is attached immediately.