-
-
+
destroy() |
none |
Remove the network from the DOM and remove all Hammer bindings and references. |
-
+
setData({
nodes: vis DataSet/Array ,
edges: vis
DataSet/Arary })
|
@@ -266,7 +266,7 @@ network.setOptions(options);
network.
-
+
setOptions(Object options ) |
none |
Set the options. All available options can be found in the modules above. Each module requires it's own
@@ -275,10 +275,10 @@ network.setOptions(options);
|
-
-
+
canvasToDOM({ x: Number , y:
Number })
|
@@ -287,7 +287,7 @@ network.setOptions(options);
{x:Number,y:Number}
. The DOM values are relative to the network container.
-
+
DOMtoCanvas({ x: Number , y:
Number })
|
@@ -296,8 +296,12 @@ network.setOptions(options);
{x:Number,y:Number}
. The DOM values are relative to the network container.
- redraw() | none | Redraw the network. |
-
+
+ redraw() |
+ none |
+ Redraw the network. |
+
+
setSize( String width , String
height )
|
@@ -305,10 +309,10 @@ network.setOptions(options);
Set the size of the canvas. This is automatically done on a window resize. |
-
-
+
cluster(
Object options )
|
@@ -319,7 +323,7 @@ network.setOptions(options);
is presented with all nodes.
-
+
clusterByConnection(
String nodeId ,
[Object options]
@@ -332,7 +336,7 @@ network.setOptions(options);
href="#optionsObject">below. The joinCondition is only presented with the connected nodes.
|
-
+
clusterByHubsize(
Number hubsize ,
[Object options] )
@@ -344,14 +348,14 @@ network.setOptions(options);
|
-
+
clusterOutliers(
[Object options] )
|
none |
This method will cluster all nodes with 1 edge with their respective connected node. |
-
+
findNode(
String nodeId )
|
@@ -364,14 +368,14 @@ network.setOptions(options);
network.clustering.findNode('fred')
will return ['A','B','C','fred']
.
-
+
isCluster(
String nodeId )
|
Boolean |
Returns true if the node whose ID has been supplied is a cluster. |
-
+
openCluster(
String nodeId )
|
@@ -393,22 +397,24 @@ network.setOptions(options);
-
-
+
enableEditMode() |
none |
Programatically enable the edit mode. Similar effect to pressing the edit button. |
-
+
disableEditMode() |
none |
Programatically disable the edit mode. Similar effect to pressing the close icon (small cross in the
corner of the toolbar).
|
-
+
addNodeMode() |
none |
Go into addNode mode. Having edit mode or manipulation enabled is not required. To get out of this mode,
@@ -417,32 +423,32 @@ network.setOptions(options);
enabled to false.
|
-
+
editNodeMode() |
none |
Go into editNode mode. The explaination from addNodeMode applies here as well. |
-
+
addEdgeMode() |
none |
Go into addEdge mode. The explaination from addNodeMode applies here as well. |
-
+
editEdgeMode() |
none |
Go into editEdge mode. The explaination from addNodeMode applies here as well. |
-
+
deleteSelected() |
none |
Delete selected. Having edit mode or manipulation enabled is not required. |
-
-
+
getPositions( [Array of nodeIds] ) |
Object |
Returns the x y positions in canvas space of the nodes with the supplied nodeIds as an object:
@@ -458,7 +464,7 @@ network.setOptions(options);
are returned.
|
-
+
storePositions() |
none |
When using the vis.DataSet to load your nodes into the network, this method will put the X and Y
@@ -480,7 +486,7 @@ network.setOptions(options);
|
-
+
getBoundingBox( String nodeId ) |
Object |
Returns a bounding box for the node including label in the format:
@@ -495,46 +501,48 @@ network.setOptions(options);
These values are in canvas space.
|
-
+
getConnectedNodes( String nodeId ) |
Array |
Returns an array of nodeIds of the all the nodes that are directly connected to this node. |
-
+
getEdges( String nodeId ) |
Array |
Returns an array of edgeIds of the edges connected to this node. |
-
-
+
startSimulation() |
none |
Start the physics simulation. This is normally done whenever needed and is only really useful if you
stop the simulation yourself and wish to continue it afterwards.
|
.
-
+
stopSimulation() |
none |
This stops the physics simulation and triggers a stabilized event. It can be restarted by
dragging a node, altering the dataset or calling startSimulation() .
|
-
+
stabilize() |
none |
You can manually call stabilize at any time. All the stabilization options above are used. |
-
-
+
getSelection() |
Object |
Returns an object with selected nodes and edges ids like this:
@@ -546,19 +554,19 @@ network.setOptions(options);
|
-
+
getSelectedNodes() |
Array |
Returns an array of selected node ids like so:
[nodeId1, nodeId2, ..] .
|
-
+
getSelectedEdges() |
Array |
Returns an array of selected edge ids like so: [edgeId1, edgeId2, ..] . |
-
+
getNodeAt( {x: xPosition DOM, y: yPosition DOM} )
|
String |
@@ -566,7 +574,7 @@ network.setOptions(options);
of the canvas.
-
+
getEdgeAt( {x: xPosition DOM, y: yPosition DOM} )
|
String |
@@ -574,7 +582,7 @@ network.setOptions(options);
of the canvas..
-
+
selectNodes( Array with nodeIds , [Boolean
highlightEdges] )
|
@@ -584,35 +592,37 @@ network.setOptions(options);
its own objects. Does not fire events.
-
+
selectEdges( Array with edgeIds ) |
none |
Selects the edges corresponding to the id's in the input array. This method unselects all other objects
before selecting its own objects. Does not fire events.
|
-
+
unselectAll() |
none |
Unselect all objects. Does not fire events. |
-
-
+
getScale() |
Number |
Returns the current scale of the network. 1.0 is comparible to 100%, 0 is zoomed out infinitely. |
-
+
getPosition() |
Number |
Returns the current central focus point of the camera. |
-
+
fit([Object options] ) |
none |
Zooms out so all nodes fit on the canvas. You can supply options to customize this:
@@ -630,7 +640,7 @@ network.setOptions(options);
All options are optional for the fit method.
|
-
+
focus(
String nodeId ,
[Object options] )
@@ -655,7 +665,7 @@ network.setOptions(options);
Default value is true. The options object is optional in the focus method.
|
-
+
moveTo(Object options ) |
none |
You can animate or move the camera using the moveTo method. Options are:
@@ -684,7 +694,7 @@ network.setOptions(options);
|
-
+
releaseNode() |
none |
Programatically release the focussed node. |
@@ -1013,7 +1023,9 @@ var locales = {
initRedraw |