File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -121,18 +121,18 @@ sigma.publicPrototype.parseGexf = function(gexfPath) {
121
121
}
122
122
123
123
var edges = [ ] ;
124
- var edgeId = 0 ;
125
124
var edgesNodes = gexf . getElementsByTagName ( 'edges' ) ;
126
125
for ( i = 0 ; i < edgesNodes . length ; i ++ ) {
127
126
var edgesNode = edgesNodes [ i ] ;
128
127
var edgeNodes = edgesNode . getElementsByTagName ( 'edge' ) ;
129
128
for ( j = 0 ; j < edgeNodes . length ; j ++ ) {
130
129
var edgeNode = edgeNodes [ j ] ;
130
+ var id = edgeNode . getAttribute ( 'id' ) ;
131
131
var source = edgeNode . getAttribute ( 'source' ) ;
132
132
var target = edgeNode . getAttribute ( 'target' ) ;
133
133
var label = edgeNode . getAttribute ( 'label' ) ;
134
134
var edge = {
135
- id : j ,
135
+ id : id ,
136
136
sourceID : source ,
137
137
targetID : target ,
138
138
label : label ,
@@ -152,7 +152,7 @@ sigma.publicPrototype.parseGexf = function(gexfPath) {
152
152
edge . attributes . push ( { attr :attr , val :val } ) ;
153
153
}
154
154
155
- sigmaInstance . addEdge ( edgeId ++ , source , target , edge ) ;
155
+ sigmaInstance . addEdge ( id , source , target , edge ) ;
156
156
}
157
157
}
158
158
} ;
You can’t perform that action at this time.
0 commit comments