Entry point for Grapher.ts component. Initializes graph drawing area (root SVG element) and its controls.
HTMLElement to which component will be added a child.
Underlying graph as defined in Domain package.
Maps handlers to toolbar modes. Allows switching between operation modes without explicitly specifying each transition.
Edges that are present in the graph that is rendered.
Root SVG element to which all other graph SVG elements are appended.
Vertices that are present in the graph that is rendered.
Adds an edge to the graph.
Edge to be added.
Calculates coordinates at which click occured relevant to SVG root.
Raw click event.
Click coordinates relevant to SVG root.
Gets vertex given coordinates if one exists. If more than one vertex exist at the point, first one found will be returned (the one that was created earliest).
Coordinates to be used for vertex location.
Vertex if one exists at given coordinates, null otherwise.
Handles graph clear button click. Clears the graph and removes all related DOM elements.
Reacts to operation mode switched cause by toolbar.
Operation mode prior to the switch.
Opeartion mode to after the switch.
Generated using TypeDoc
Main Grapher.ts class. Visualizes the graph. Acts as a container for root SVG element.