Options
All
  • Public
  • Public/Protected
  • All
Menu

Handler that set-ups and tear-downs listeners needed to handle user input associated with adding new vertices to a graph. Also contains methods that are passed to those listeners.

Hierarchy

  • VertexHandler

Implements

Index

Constructors

constructor

Properties

Protected graph

graph: Grapher

Graph representatation to which new vertices are to be added.

Methods

activateVertixDrag

  • activateVertixDrag(vertex: SvgVertex): void

disable

  • disable(): void

enable

  • enable(): void

Protected onDrag

  • onDrag(vertex: SvgVertex, event: InteractEvent): void
  • Method that handles dragging input when moving a vertex. Repositions the vertice based on drag events.

    Parameters

    • vertex: SvgVertex

      Vertex that is being dragged.

    • event: InteractEvent

      Drag event.

    Returns void

Protected onDragEnd

  • onDragEnd(vertex: SvgVertex, event: InteractEvent): void
  • Method that handles end of drag when moving a vertex. Unhides edges of vertex that was dragged.

    Parameters

    • vertex: SvgVertex

      Vertex for which drag ended.

    • event: InteractEvent

      Drag end event.

    Returns void

Protected onDragStart

  • onDragStart(vertex: SvgVertex, event: InteractEvent): void
  • Method that handles start of drag when moving a vertex. Hides edges of vertex that is being repositioned.

    Parameters

    • vertex: SvgVertex

      Vertex that started to be dragged.

    • event: InteractEvent

      Drag start 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