diff --git a/HISTORY.md b/HISTORY.md index 5894cb3a..b59f5723 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -23,6 +23,7 @@ http://visjs.org - Made the network keep its 'view' during a change of the size of the container. - Added improvedLayout as experimental option for greatly improved stabilization times. - Added adaptiveTimestep as experimental option for greatly improved stabilization times. +- Added support for Gephi directed edges, edge labels and titles. ## 2015-07-27, version 4.7.0 diff --git a/lib/network/gephiParser.js b/lib/network/gephiParser.js index 0e492964..124d6b45 100644 --- a/lib/network/gephiParser.js +++ b/lib/network/gephiParser.js @@ -29,6 +29,9 @@ function parseGephi(gephiJSON, optionsObj) { edge['attributes'] = gEdge.attributes; edge['label'] = gEdge.label; edge['title'] = gEdge.attributes !== undefined ? gEdge.attributes.title : undefined; + if (gEdge['type'] === 'Directed') { + edge['arrows'] = 'to'; + } // edge['value'] = gEdge.attributes !== undefined ? gEdge.attributes.Weight : undefined; // edge['width'] = edge['value'] !== undefined ? undefined : edgegEdge.size; if (gEdge.color && options.inheritColor === false) {