diff --git a/lib/network/Network.js b/lib/network/Network.js index d43f60e4..54a0242c 100644 --- a/lib/network/Network.js +++ b/lib/network/Network.js @@ -273,6 +273,9 @@ Network.prototype._updateVisibleIndices = function () { if (!this.clustering._isClusteredEdge(edgeId) && edge.options.hidden === false + // Not all nodes may be present due to interim refresh + && nodes[edge.fromId] !== undefined + && nodes[edge.toId ] !== undefined // Also hidden if any of its connecting nodes are hidden && nodes[edge.fromId].options.hidden === false && nodes[edge.toId ].options.hidden === false) { diff --git a/lib/network/modules/PhysicsEngine.js b/lib/network/modules/PhysicsEngine.js index 5f176a9d..2fe9b52e 100644 --- a/lib/network/modules/PhysicsEngine.js +++ b/lib/network/modules/PhysicsEngine.js @@ -134,6 +134,11 @@ class PhysicsEngine { this.physicsEnabled = false; this.stopSimulation(); } + else if (options === true) { + this.options.enabled = true; + this.physicsEnabled = true; + this.startSimulation(); + } else { this.physicsEnabled = true; util.selectiveNotDeepExtend(['stabilization'], this.options, options);