Skip to content

Commit

Permalink
Merge pull request #14 from WestHealth/hotfix/i13-network-vis-fails-a…
Browse files Browse the repository at this point in the history
…fter-disable-physics-one-node

Hotfix/i13 network vis fails after disable physics one node
  • Loading branch information
boludo00 committed Jun 26, 2018
2 parents af27f66 + edd2fe2 commit 5b7393d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyvis/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ def from_nx(self, nx_graph):
nodes = nx_graph.nodes()
if len(edges) > 0:
for e in edges:
self.add_node(e[0], e[0], title=e[0])
self.add_node(e[1], e[1], title=e[1])
self.add_node(e[0], e[0], title=str(e[0]))
self.add_node(e[1], e[1], title=str(e[1]))
self.add_edge(e[0], e[1])
else:
self.add_nodes(nodes)
Expand Down
4 changes: 2 additions & 2 deletions pyvis/templates/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@
{% else %}

// parsing and collecting nodes and edges from the python
nodes = new vis.DataSet({{nodes|safe}});
edges = new vis.DataSet({{edges|safe}});
nodes = new vis.DataSet({{nodes|tojson}});
edges = new vis.DataSet({{edges|tojson}});

// adding nodes and edges to the graph
data = {nodes: nodes, edges: edges};
Expand Down

0 comments on commit 5b7393d

Please sign in to comment.