Skip to content

Commit 07803c1

Browse files
Resetting graph fix
1 parent ee26dcf commit 07803c1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iknow-entity-browser",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"description": "Visualizer for iKnow entities",
55
"main": "gulpfile.babel.js",
66
"scripts": {

src/static/js/graph/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,13 @@ export function update (reset = false) {
188188
edges: flattenEdges(g)
189189
};
190190

191+
if (reset) {
192+
link = link.data([]);
193+
link.exit().remove();
194+
node = node.data([]);
195+
node.exit().remove();
196+
}
197+
191198
link = links.selectAll("line").data(graph.edges, (d) => d.target.id);
192199
link.exit().remove();
193200
let linkEnter = link.enter().append("line")

0 commit comments

Comments
 (0)