Browse Source

Fix #2940 Gephi consolidate double assignment of node title. (#2962)

gemini
wimrijnders 7 years ago
committed by yotamberk
parent
commit
3d79ad5631
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      lib/network/gephiParser.js

+ 2
- 3
lib/network/gephiParser.js View File

@ -45,11 +45,10 @@ function parseGephi(gephiJSON, optionsObj) {
var gNode = gNodes[i]; var gNode = gNodes[i];
node['id'] = gNode.id; node['id'] = gNode.id;
node['attributes'] = gNode.attributes; node['attributes'] = gNode.attributes;
node['title'] = gNode.title;
node['x'] = gNode.x; node['x'] = gNode.x;
node['y'] = gNode.y; node['y'] = gNode.y;
node['label'] = gNode.label; node['label'] = gNode.label;
node['title'] = gNode.attributes !== undefined ? gNode.attributes.title : undefined;
node['title'] = gNode.attributes !== undefined ? gNode.attributes.title : gNode.title;
if (options.nodes.parseColor === true) { if (options.nodes.parseColor === true) {
node['color'] = gNode.color; node['color'] = gNode.color;
} }
@ -64,4 +63,4 @@ function parseGephi(gephiJSON, optionsObj) {
return {nodes:nodes, edges:edges}; return {nodes:nodes, edges:edges};
} }
exports.parseGephi = parseGephi;
exports.parseGephi = parseGephi;

Loading…
Cancel
Save