From 28cbef5bb67701cefd8d2a3fc9a0dc6fc5e23058 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sun, 22 Mar 2015 14:21:11 +0100 Subject: [PATCH] make linkId unique --- history.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/history.js b/history.js index bbc066e..e91c7cf 100644 --- a/history.js +++ b/history.js @@ -195,7 +195,9 @@ function showTq(d) { } function linkId(d) { - return d.source.node.nodeinfo.node_id + "-" + d.target.node.nodeinfo.node_id + var ids = [d.source.node.nodeinfo.node_id, d.target.node.nodeinfo.node_id] + + return ids.sort().join("-") } function mkmap(map, newnodes, lostnodes, onlinenodes, graph, gotoAnything) {