Skip to content

Commit

Permalink
fix small physics bug in visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
YouGuessedMyName committed Feb 19, 2025
1 parent 08f64a2 commit f0b0814
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions stormvogel/html_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@
for (let i = 0; i < nodeIds.length; i++) {
var toNodeId = nodeIds[i];
var toNode = nodes.get(toNodeId);
toNode["hidden"] = false;
toNode["physics"] = true;
toNode["x"] = network.getPosition(homeId)["x"];
toNode["y"] = network.getPosition(homeId)["y"];
nodes.update(toNode);
if (toNode["hidden"]) {
toNode["hidden"] = false;
toNode["physics"] = true;
toNode["x"] = network.getPosition(homeId)["x"];
toNode["y"] = network.getPosition(homeId)["y"];
nodes.update(toNode);
}
}
// Make edges visible, if both of the nodes are also visible
var edgeIds = network.getConnectedEdges(homeId);
Expand Down

0 comments on commit f0b0814

Please sign in to comment.