Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GraphComponentState

The state object describes the information to visualize for this component. All the coordinates are in the range 0..1.

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

horizontalGridLine

  • horizontalGridLine(index: number): number
  • Accesses the y coordinate of the horizontal grid line specified. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns number

horizontalGridLinesLen

  • horizontalGridLinesLen(): number

isFlipped

  • isFlipped(): boolean
  • Describes whether the graph is flipped vertically. For visualizing the graph, this usually doesn't need to be interpreted, as this information is entirely encoded into the other variables.

    Returns boolean

isLiveDeltaActive

  • isLiveDeltaActive(): boolean
  • If the live delta is active, the last point is to be interpreted as a preview of the next split that is about to happen. Use the partial fill color to visualize the region beneath that graph segment.

    Returns boolean

middle

  • middle(): number
  • The y coordinate that separates the region that shows the times that are ahead of the comparison and those that are behind.

    Returns number

pointIsBestSegment

  • pointIsBestSegment(index: number): boolean
  • Describes whether the segment the point specified is visualizing achieved a new best segment time. Use the best segment color for it, in that case. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns boolean

pointX

  • pointX(index: number): number
  • Returns the x coordinate of the point specified. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns number

pointY

  • pointY(index: number): number
  • Returns the y coordinate of the point specified. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns number

pointsLen

  • pointsLen(): number
  • Returns the amount of points to visualize. Connect all of them to visualize the graph. If the live delta is active, the last point is to be interpreted as a preview of the next split that is about to happen. Use the partial fill color to visualize the region beneath that graph segment.

    Returns number

verticalGridLine

  • verticalGridLine(index: number): number
  • Accesses the x coordinate of the vertical grid line specified. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns number

verticalGridLinesLen

  • verticalGridLinesLen(): number

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

Generated using TypeDoc