Options
All
  • Public
  • Public/Protected
  • All
Menu

Handler that set-ups and tear-downs listeners needed to handle user input associated with manipulating weights of edges. Also handles the aforementioned events and updates weights of edges.

Hierarchy

  • WeightsHandler

Implements

Index

Constructors

constructor

Properties

Protected graph

graph: Grapher

Graph representatation which contains edges for which weights will be chaged.

Private keypressListener

keypressListener: function

Keypress listener for tracking weight input. Stored in order to unsubscribe the listener on tear down.

Type declaration

    • (event: KeyboardEvent): void
    • Parameters

      • event: KeyboardEvent

      Returns void

Private selectedEdge

selectedEdge: SvgEdge | null

Edge for which weight is being entered.

Methods

disable

  • disable(): void

enable

  • enable(): void

Protected handleWeightKeypress

  • handleWeightKeypress(event: KeyboardEvent): void
  • Handles keypress and alters weight accordingly for currently selected edge. Does nothing if no edge is selected.

    Parameters

    • event: KeyboardEvent

      Keyboard press event.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc