Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

Properties

classList

classList: DOMTokenList

Class attribute for the root element.

nodes

nodes: Node[]

options

options: GraphOptions

root

root: SVGGElement

style

style: CSSStyleDeclaration

Style for the root element.

update

update: function

The update function describes how this element should update itself

Type declaration

    • (): void
    • Returns void

Static controller

controller: Controller = new Controller()

The controller manages the dependencies between elements. Every element is added to this controller upon creation.

Static count

count: number = 0

This number uniquely identifes elements

Static disable

disable: boolean = false

Allows for the events attatched to elements to be disabled.

Accessors

id

id:

Returns the unique generated identifier associated with this element.

Methods

a

  • a(href: string): A
  • Constructs and appends an 'a' (link) within this element.

    Parameters

    • href: string

    Returns A

addDependency

addEdge

  • Adds an edge without direction between the two given nodes.

    Parameters

    Returns Edge

addNode

  • addNode(x: number, y: number, text: string, rx?: number, ry?: number): Node
  • Adds a node at the given location with the given text. radius defaults to 20, 20

    Parameters

    • x: number
    • y: number
    • text: string
    • Default value rx: number = 20
    • Default value ry: number = 20

    Returns Node

appendChild

  • appendChild<T>(child: T): T

calculateShift

  • calculateShift(leftList: any, rightList: any): number
  • Parameters

    • leftList: any
    • rightList: any

    Returns number

circle

  • circle(cx: number, cy: number, r: number): Circle
  • Parameters

    • cx: number
    • cy: number
    • r: number

    Returns Circle

clear

  • clear(): void
  • Clears all nodes and all edges from the graph, removes them from the dom.

    Returns void

clearModMap

  • clearModMap(modMap: any): any
  • Parameters

    • modMap: any

    Returns any

clipPath

  • Constructs and appends a clipPath within this element

    Returns ClipPath

contains

  • contains(element: Element): boolean
  • Returns true if this element contains the argument element.

    Parameters

    Returns boolean

defs

  • defs(): Defs

description

ellipse

  • ellipse(cx: number, cy: number, rx: number, ry: number): Ellipse
  • Parameters

    • cx: number
    • cy: number
    • rx: number
    • ry: number

    Returns Ellipse

fixConflicts

  • fixConflicts(root: any, orderedNodes: any, modMap: any): any
  • Parameters

    • root: any
    • orderedNodes: any
    • modMap: any

    Returns any

fixOffScreen

  • fixOffScreen(root: any, modMap: any): void
  • Parameters

    • root: any
    • modMap: any

    Returns void

getAttribute

getBoundingBox

  • getBoundingBox(): SVGRect
  • Returns the bounding box of this element. Note, this is different from the getBoundingClientRect method since the bounding box is affected by the current viewPort.

    If this element's root is not a SVGGraphics element as is the case for the marker, title, and more element, then null is returned instead of a DOMRect.

    Returns SVGRect

getNodes

  • getNodes(): Node[]
  • Getter for the list of all nodes inside this graph.

    Returns Node[]

group

leftContour

  • leftContour(node: Node, contourList: any): any
  • Parameters

    • node: Node
    • contourList: any

    Returns any

line

  • line(x1: number, y1: number, x2: number, y2: number): Line
  • Parameters

    • x1: number
    • y1: number
    • x2: number
    • y2: number

    Returns Line

metadata

path

  • path(d: string): Path
  • Parameters

    • d: string

    Returns Path

polygon

  • Parameters

    • points: string

    Returns Polygon

postTraverse

  • postTraverse(node: Node, list: any): any
  • Parameters

    • node: Node
    • list: any

    Returns any

prependChild

  • prependChild<T>(child: T): T

rectangle

  • rectangle(x: number, y: number, width: number, height: number): Rectangle
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number

    Returns Rectangle

remove

  • remove(): void

rightContour

  • rightContour(node: Node, contourList: any): any
  • Parameters

    • node: Node
    • contourList: any

    Returns any

setAttribute

shiftChildrenByMod

  • shiftChildrenByMod(node: Node, mod: any, modMap: any): void
  • Parameters

    • node: Node
    • mod: any
    • modMap: any

    Returns void

size

  • size(): number
  • Returns the size of this graph

    Returns number

svg

  • svg(x: number, y: number, width: number, height: number): SVG
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number

    Returns SVG

symbol

text

  • text(x: number, y: number, str: string): Text
  • Constructs and appends a text element within this element.

    Parameters

    • x: number
    • y: number
    • str: string

    Returns Text

tidy

  • tidy(root: Node): void
  • The tidy algorithm. Assuming a tree for now, pass it the root.

    Parameters

    Returns void

title

updateDependents

  • updateDependents(): void

use

  • use(x: number, y: number, width: number, height: number): Use
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number

    Returns Use

Static clear

  • clear(disable?: boolean): void
  • Clears the static data structures holding elements and resets the count.

    Parameters

    • Default value disable: boolean = false

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • 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