Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LogController

A container component for tracks, with track titles, legends, adding/removing tracks, resizing and user interaction.

Hierarchy

Index

Constructors

constructor

Properties

Private _deferredUpdate

_deferredUpdate: any = null

Protected _initialized

_initialized: boolean

Protected _legendHeight

_legendHeight: number

Private _observer

_observer: ResizeObserver

Private _scaleHandler

_scaleHandler: ScaleHandler

Protected _titleFontSize

_titleFontSize: number

Protected _titleHeight

_titleHeight: number

Protected _trackHeight

_trackHeight: number

Protected _uiScale

_uiScale: number

container

container: D3Selection

debounce

height

height: number

legendRows

legendRows: number

legends

legends: object

Type declaration

options

tracks

tracks: Track[]

width

width: number

zoom

zoom: ZoomBehavior<Element, any>

Accessors

domain

innerBounds

  • get innerBounds(): object
  • Get the track container's dimmensions, relative to orientation.

    Returns object

    • length: number
    • span: number

scale

scaleHandler

zoomHandler

  • get zoomHandler(): any

Methods

Private _trackEnter

Private _trackExit

Private _trackUpdate

addTrack

adjustToSize

  • adjustToSize(force?: boolean): void
  • Rescale according to new container size

    Parameters

    • Default value force: boolean = false

      Set to true in order to force update even if size has not changed

    Returns void

Protected adjustTrackTitles

  • adjustTrackTitles(): void
  • Adjust track titles according to available space. Uses abbrievation istead of full label if not enough space.

    Returns void

Protected adjustZoomTransform

  • adjustZoomTransform(): void

init

  • Convenience method if used stand-alone. Wraps onMount and returns self for chaining.

    Parameters

    • element: HTMLElement

      HTML element to attach itself to

    Returns LogController

onMount

  • onMount(element: HTMLElement): void
  • Initialize the component and attach itself to the provided DOM element.

    Parameters

    • element: HTMLElement

      HTML element to attach itself to

    Returns void

onUnmount

  • onUnmount(): void

Protected postUpdateTracks

  • postUpdateTracks(): void

Protected processLegendConfig

  • processLegendConfig(track: Track, element: Element): void
  • Processes track legend config object, creating the necessary DOM elements and hooking up callback functions etc.

    Parameters

    • track: Track

      Track to process

    • element: Element

      Legend element

    Returns void

refresh

  • refresh(): void

removeTrack

rescale

  • rescale(): void

reset

setTracks

Protected setup

  • setup(element: HTMLElement): void
  • Setup DOM elements, scale and behaviour

    Parameters

    • element: HTMLElement

      Html element to attach to

    Returns void

Protected updateLegend

  • updateLegend(id: string | number): void
  • Updates the legend for a specific track

    Parameters

    • id: string | number

      Track id

    Returns void

Protected updateLegendRows

  • updateLegendRows(): void

updateTracks

zoomTo

Protected zoomed

  • zoomed(): void

Static basic

  • Simple creator function for minimal setup

    Parameters

    • Default value showTitles: boolean = true

      optional flag to show titles or not

    Returns LogController

Generated using TypeDoc