Class: Link

ge.Link(graph, data)

Graph link class.

Constructor

Graph link constructor.
Parameters:
Name Type Description
graph ge.GraphEditor Link container.
data ImportLinkData Link data.
Source:

Members

data :*

User data.
Type:
  • *
Source:

(readonly) defId :string

SVG text path element ID.
Type:
  • string
Source:

(readonly) defSelector :Selector

SVG text path element selector.
Type:
Source:

(readonly) elementId :string

SVG element ID.
Type:
  • string
Source:

(readonly) id :ID

ID.
Type:
Source:

initSelection

Initialize SVG elements.
Source:
See:
  • ge.GraphEditor.update
  • ge.GraphEditor.linkEvents

(readonly) path :string

SVG path.
Type:
  • string
Source:

(readonly) pathId :string

SVG element ID.
Type:
  • string
Source:

(readonly) pathSelector :Selector

SVG element selector.
Type:
Source:

(readonly) reversed :boolean

True if text path is reversed.
Type:
  • boolean
Source:

(readonly) selector :string

SVG element selector.
Type:
  • string
Source:

shape :ge.path.Path

Path generator.
Type:
Source:

source :ge.Node

Source node.
Type:
Source:

target :ge.Node

Target node.
Type:
Source:

title :string

Title.
Type:
  • string
Source:

updateSelection

Update SVG elements.
Source:
See:
  • ge.GraphEditor.updateLink

Methods

(static) initSelection(links, defs, opts, cls)

Initialize SVG elements.
Parameters:
Name Type Description
links D3Selection SVG element enter selection.
defs D3Selection SVG element enter selection.
opts object Link options.
Properties
Name Type Description
text.dx number Link title X offset.
text.dy number Link title Y offset.
cls string CSS class.
Source:

(static) updateSelection(links, defs, opts, transition)

Update SVG elements.
Parameters:
Name Type Description
links D3Selection SVG element selection.
defs D3Selection SVG element selection.
opts object Link options.
transition function Transition generator.
Source:
See:
  • ge.GraphEditor.updateLink

toJson(graph) → {ExportLinkData}

Convert to JSON.
Parameters:
Name Type Description
graph ge.GraphEditor Graph.
Source:
Returns:
JSON data.
Type
ExportLinkData

update()

Update link data.
Source: