Boolean indicating if the top of the viewport has been scrolled beyond this point
Boolean indicating if the point is currently within the bounds of the target element. Updated when checkInView() is called.
Boolean indicating if the point is currently in view. Updated when checkInView() is called.
The parent EventDispatcher instance. If this instance has no parent, this value will be set to null. The parent is used in the bubbling and capturing phases of events.
Change the height of this point. Executes checkInView to check if the point has entered or leaved view.
The current height of the point in pixels. This is the distance from the start or end of the target element depending on the 'side' parameter, measured horizontally or vertically depending on the axis of this ScrollTracker instance.
Change the height of this point. Executes checkInView to check if the point has entered or leaved view.
The height of this points in pixels. This is the distance from the start or end of the target element depending on the 'side' parameter, measured horizontally or vertically depending on the axis of this ScrollTracker instance.
The current height of the point in pixels. This is the distance from the start or end of the target element depending on the 'side' parameter, measured horizontally or vertically depending on the axis of this ScrollTracker instance.
Change the position of this point. Executes checkInView to check if the point has entered or leaved view.
The current position of the point in pixels. This is the distance from the start or end of the target element depending on the 'side' parameter, measured horizontally or vertically depending on the axis of this ScrollTracker instance.
Change the position of this point. Executes checkInView to check if the point has entered or leaved view.
The position of this points in pixels. This is the distance from the start or end of the target element depending on the 'side' parameter, measured horizontally or vertically depending on the axis of this ScrollTracker instance.
The current position of the point in pixels. This is the distance from the start or end of the target element depending on the 'side' parameter, measured horizontally or vertically depending on the axis of this ScrollTracker instance.
The side of from which the position of this point is measured.
Adds a new event listener. The given handler function will be called in the following cases:
The eventType to listen for
The handler function that will be called when a matching event is dispatched. This function will retrieve the dispatched [[IEvent|event]] as a parameter
Indicates if this handler should be called during the capturing phase of an event chain. If and only if this is set to false will this handler be called during the bubbling phase of an event chain.
A number that indicates the priority of this event listener relative to other event listeners of the same type on this EventDispatcher instance. A higher number indicates that this listener will be called earlier.
An object describing the listener that has a [[EventListenerData.dispose|dispose()]] method to remove the listener.
Checks if this point is in view using it's position and the current scroll position saved on the ScrollTracker. Updates the isInView property accordingly.
True if this point is in view.
Dispatches the given event. The dispatch consists of three phases:
If any of the event handlers call [[IEvent.stopPropagation|stopPropagation()]], we will skip all event handlers that occur on a target later in the event chain. If an event handler calls [[IEvent.stopImmediatePropagation|stopImmediatePropagation()]], we will also skip any event handlers on the same target in the event chain.
The event to dispatch
If one of the handlers that have been called during this dispatch called [[IEvent.preventDefault|event.preventDefault()]], this method will return false. If no handlers have been called or none of the handlers have called [[IEvent.preventDefault|event.preventDefault()]], this method will return true.
Please note: [[IEvent.preventDefault|preventDefault()]] can only be called on events that have their [[IEvent.cancelable|cancelable]] property set to true
Disposes the ScrollTrackerPoint instance.
Checks if an event listener matching the given parameters exists on this EventDispatcher instance.
Will only look for event listeners with this eventType
If set, will only match event listeners that have the same handler function
If set, will only match event listeners that have the same useCapture argument. Please note: if no useCapture argument was provided to addEventListener, it is set to false by default
True if one or more event listeners exist
After dispose has been called, this method returns true. Use this method to determine whether dispose() should be run again.
Removes all event listeners that have a [[IEvent.type|type]] of the given eventType from this EventDispatcher instance, regardless of their [[EventListenerData.handler|handler]] or [[EventListenerData.useCapture|useCapture]] property.
Please note: if you remove an event listener during the dispatch of an event it will not be called anymore, even if it was supposed to be called in the same event chain
The [[IEvent.type|type]] of event to remove. If not provided, all event listeners will be removed regardless of their type.
Removes all event listeners that match the given parameters from this EventDispatcher instance.
Please note: if you remove an event listener during the dispatch of an event it will not be called anymore, even if it was supposed to be called in the same event chain
Only event listeners of that have this eventType are removed
Only event listeners that have this handler function will be removed
Only event listeners that have been added with the same useCapture parameter will be removed. Please note: if no useCapture argument is provided, only event listeners that have useCapture set to false will be removed.
Checks if an event listener with a [[EventListenerData.type|type]] of the given eventType exists on this EventDispatcher or any ancestor EventDispatcher instance.
The event type to check for
true if a matching listener is found
Generated using TypeDoc
Instance created for every coordinate that a ScrollTracker tracks.