From b752755a36f1b5eb13ae89d0c6bbbcd6c303000a Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 1 Sep 2016 08:55:40 +0100 Subject: [PATCH] =?UTF-8?q?Added=20getBaseEdge,=20getClusteredEdges=20upda?= =?UTF-8?q?teEdge=20and=20updateClusteredNo=E2=80=A6=20(#2055)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added getBaseEdge, getClusteredEdges updateEdge and updateClusteredNode to allow option changes of the clustered edges as they are no longer the original base Edge changing edge color is a good example. i.e network.clustering.updateEdge(originalEdge.id, {color : '#aa0000'}); will now update all edges including the ones that were created when clustering. Also when clicking on a clustered edge the event returns the clustered Edge id, which doesn't mean a lot. This can be now converted back into the original edge with network.clustering.getBaseEdge(clusteredEdge.id) Similar with updateClusteredNode This new method allows the options to be changed on a clustered Node. i.e clicking on a clustered node gives its clustered node id. Want to change the clustered image to a star then do this network.clustering.updateClusteredNode(clusteredNodeId, {shape : 'star'}); * Updated docs with getClusteredEdge, getBaseEdge, updateEdge and updateClusteredNode Also added method subsections into contents * Added better error handling to updateEdge and updateClusteredNodes corrected errors spotted by @mojoaxel * Added example html demonstrating getBaseEdge, getClusteredEdges updateEdge and updateClusteredNode --- docs/network/index.html | 78 +++++++++++-- .../other/changingClusteredEdgesNodes.html | 107 ++++++++++++++++++ lib/network/modules/Clustering.js | 79 ++++++++++++- 3 files changed, 247 insertions(+), 17 deletions(-) create mode 100644 examples/network/other/changingClusteredEdgesNodes.html diff --git a/docs/network/index.html b/docs/network/index.html index bd7d7c3c..0f8ef8ff 100644 --- a/docs/network/index.html +++ b/docs/network/index.html @@ -210,7 +210,20 @@