Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StructureViz

Super class for structures like trees, graphs, etc

Hierarchy

Index

Constructors

Protected constructor

  • new StructureViz(width: number, height: number): StructureViz
  • Parameters

    • width: number
    • height: number

    Returns StructureViz

Properties

id

id: string

dom id for <g> element

maxHeight

maxHeight: number

maxWidth

maxWidth: number

pseudo

pseudo: Pseudocode

timeline

timeline: any[]

Array of animation states through time

transitionDuration

transitionDuration: number

Methods

Protected getElement

  • getElement(): Selection<any, any, any, any>
  • Returns the d3 selection that represents the structure. Probably a <g> element

    Returns Selection<any, any, any, any>

getState

  • getState(): any
  • Returns a copy of the structures current state.

    Returns any

pushAndTransition

  • pushAndTransition(): void
  • Pushes the current state onto the timeline and transitions to it.

    Returns void

pushState

  • pushState(): void
  • Adds the current state to the timeline.

    Returns void

setMaxHeight

  • setMaxHeight(n: number): void
  • Parameters

    • n: number

    Returns void

setMaxHeightWidth

  • setMaxHeightWidth(n: number): void
  • Parameters

    • n: number

    Returns void

transition

  • transition(state: any): void
  • Transitions the visuals to the given state. Details are implemented in subclasses. In subclasses, call super.transition(state); in the transition implementation.

    Parameters

    • state: any

    Returns void

Abstract wipeOut

  • wipeOut(): void
  • Returns the structure to it's blank state

    Returns void

Generated using TypeDoc