Skip to content

Commit

Permalink
Correctly handle floating edges
Browse files Browse the repository at this point in the history
(getting close to #18 now)
  • Loading branch information
controversial committed May 9, 2016
1 parent 6f1983d commit e9369ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/network_serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ function networkToJson() {
// Store startpages
out.startpages = startpages;

// Store floating edges
out.edges = getFloatingEdges();

return JSON.stringify(out);
}

Expand Down Expand Up @@ -147,6 +150,7 @@ function networkFromJson(data) {
out.nodes.add(expandedNodes);
// Store edges
out.edges = buildEdges(expandedNodes);
out.edges.add(data.edges);

return out;
}

0 comments on commit e9369ff

Please sign in to comment.