Global

Methods

chooseColor(name) → {string}

Return the RGB color linked to the group name
Source:
Parameters:
Name Type Description
name string Group name
Returns:
Type:
string
- RGB formated color

findConnectedNodes(nodeId) → {array}

Return metas from connected nodes
Source:
Parameters:
Name Type Description
nodeId number Entity id
Returns:
Type:
array
objects array contains metadatas

getNodeMetas(nodeId) → {mixed}

Return the metadatas from a node (d3) element
Source:
Parameters:
Name Type Description
nodeId number Entity id
Returns:
Type:
mixed
metadatas of false if malfunction

getNodeNetwork(nodeId) → {object}

Get d3 elts objects : the node, its links and its linked nodes
Source:
Parameters:
Name Type Description
nodeId number
Returns:
Type:
object
- {node, links, connectedNodes}

highlightNodeNetwork(nodeId)

Highlight a node with the highlight color
Source:
Parameters:
Name Type Description
nodeId number

switchNode(nodeId, mustZoom) → {boolean}

Change view (graph focus & description bar content) about a node
Source:
Parameters:
Name Type Default Description
nodeId number Entity id
mustZoom boolean true if true : zoom on node
Returns:
Type:
boolean
if it works

translate()

Apply zoom paramters from 'graph.zoomParams'
Source:

unlightNodeNetwork()

Unlight the selected node (by his id)
Source:

zoomLess()

Zoom out from graph SVG
Source:

zoomMore()

Zoom in from graph SVG
Source:

zoomReset()

Set default parameter to 'graph.zoomParams' then apply them
Source:

zoomToNode(nodeId)

Zoom to a node from its coordinates
Source:
Parameters:
Name Type Description
nodeId number