ElementScrollHost class
Provides a scroll host that is restricted within the content area of a specific element.
- Implemented types
- Annotations
-
- @Directive(selector: '[acxScrollHost]', providers: [ExistingProvider(ScrollHost, ElementScrollHost), ValueProvider(Clock, clockValue), GestureListenerFactory], exportAs: 'acxScrollHost', visibility: Visibility.all)
Constructors
- ElementScrollHost(DomService _domService, NgZone _ngZone, GestureListenerFactory _gestureListenerFactory, HtmlElement element)
Properties
- anchorElement → Element
-
Returns anchor element for hosting virtual horizontal scrollbar.
no setter
- clientHeight → int
-
The visible content height
no setter
- clientWidth → int
-
The visible content width
no setter
- disableAutoScroll ← bool
-
If true, forces a vertical scrollbar to appear even if the contents are
not long enough to normally trigger a scrollbar.
no getter
- element → HtmlElement
-
final
- enableSmoothPushing ← bool
-
If enabled, smoothly push colliding elements which share a stickyKey,
instead of overlapping them (limitations apply).
no getter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
nativeOnScroll
→ Stream<
ScrollHostEvent> -
The stream of ScrollHostEvents before they have been handled to scroll the
content of the ScrollHost.
no setter
- offsetX → num
-
The leftmost position
no setter
- offsetY → num
-
The topmost position
no setter
-
onScroll
→ Stream<
ScrollHostEvent> ? -
The stream of ScrollHostEvents from nativeOnScroll after they have been
handled, i.e. the content of the ScrollHost has been scrolled.
no setter
-
onUpdate
→ Stream<
Null> -
Fires an event immediately after StickyController updates the DOM.
no setter
- panController → PanController?
-
Gets the pan controller for the given scroll host.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollbarHost → GlobalEventHandlers
-
The target of scroll events from the scrollbar.
no setter
- scrollHeight → int
-
The total scrollable content height
no setter
- scrollHost → ElementScrollHostBase
-
no setter
- scrollLength → int
-
The total scrollable length.
no setter
- scrollPosition → int
-
The current position (>=0, < scrollLength)
no setter
- stickyController → StickyController?
-
Gets the sticky controller for the given scroll host.
no setter
- throttleScrollEvents → bool
-
Whether to throttle scroll events to at most one event per frame.
no setter
- usePositionSticky ↔ bool
-
Whether to use position: sticky and multithreaded scrolling.
getter/setter pair
- useTouchGestureListener ↔ bool
-
Whether to use GestureListener to override the native browser smooth
scrolling on touch devices.
getter/setter pair
Methods
-
calcViewportRect(
) → Rectangle< num> - Returns absolute positions of the visible frame.
-
dispose(
) → void - Disposes this disposable and any resources it has open.
-
ngOnDestroy(
) → void - Executed before the directive is removed from the DOM and destroyed.
-
ngOnInit(
) → void - Executed after the first change detection run for a directive.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onIntersection(
Element? element) → Stream< IntersectionObserverEntry?> -
A stream which fires when
element
intersects with the scroll viewport. -
scrollToPosition(
int position) → void - Scrolls the scrollbar into the new position.
-
scrollWithDelta(
int delta) → void - Scrolls the scrollbar with the given delta.
-
startNativeScrollListener(
) → void - Start intercepting events that would cause scrolling.
-
stopEvent(
WheelEvent event) → void - Stop an event.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited