Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SplitsComponent

The Splits Component is the main component for visualizing all the split times. Each segment is shown in a tabular fashion showing the segment icon, segment name, the delta compared to the chosen comparison, and the split time. The list provides scrolling functionality, so not every segment needs to be shown all the time.

Hierarchy

Index

Constructors

constructor

Properties

ptr

ptr: number

Methods

dispose

  • dispose(): void
  • Disposes the object, allowing it to clean up all of its memory. You need to call this for every object that you don't use anymore and hasn't already been disposed.

    Returns void

intoGeneric

  • Converts the component into a generic component suitable for using with a layout.

    Returns Component

scrollDown

  • scrollDown(): void
  • Scrolls down the window of the segments that are shown. Doesn't move the scroll window if it reaches the bottom of the segments.

    Returns void

scrollUp

  • scrollUp(): void
  • Scrolls up the window of the segments that are shown. Doesn't move the scroll window if it reaches the top of the segments.

    Returns void

setAlwaysShowLastSplit

  • setAlwaysShowLastSplit(alwaysShowLastSplit: boolean): void
  • If not every segment is shown in the scrolling window of segments, then this determines whether the final segment is always to be shown, as it contains valuable information about the total duration of the chosen comparison, which is often the runner's Personal Best.

    Parameters

    • alwaysShowLastSplit: boolean

    Returns void

setSeparatorLastSplit

  • setSeparatorLastSplit(separatorLastSplit: boolean): void
  • If the last segment is to always be shown, this determines whether to show a more pronounced separator in front of the last segment, if it is not directly adjacent to the segment shown right before it in the scrolling window.

    Parameters

    • separatorLastSplit: boolean

    Returns void

setSplitPreviewCount

  • setSplitPreviewCount(count: number): void
  • If there's more segments than segments that are shown, the window showing the segments automatically scrolls up and down when the current segment changes. This count determines the minimum number of future segments to be shown in this scrolling window when it automatically scrolls.

    Parameters

    • count: number

    Returns void

setVisualSplitCount

  • setVisualSplitCount(count: number): void
  • The amount of segments to show in the list at any given time. If this is set to 0, all the segments are shown. If this is set to a number lower than the total amount of segments, only a certain window of all the segments is shown. This window can scroll up or down.

    Parameters

    • count: number

    Returns void

state

stateAsJson

with

  • Allows for scoped usage of the object. The object is guaranteed to get disposed once this function returns. You are free to dispose the object early yourself anywhere within the scope. The scope's return value gets carried to the outside of this function.

    Type parameters

    • T

    Parameters

    Returns T

Static new

  • Creates a new Splits Component.

    Returns SplitsComponent

Generated using TypeDoc