Skip to content

Commit

Permalink
Merge pull request #385 from multinet-app/simulation-restore
Browse files Browse the repository at this point in the history
Allow restoring edge length from the provenance state
  • Loading branch information
JackWilb authored Aug 29, 2023
2 parents 0fb7621 + b25384c commit 161c7d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/MultiLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const {
nodeSizeScale,
nodeColorScale,
edgeWidthScale,
edgeLength,
} = storeToRefs(store);
// Commonly used variables
Expand Down Expand Up @@ -497,7 +498,7 @@ watch(attributeRanges, () => {
applyForceToSimulation(
simulation.value,
'edge',
forceLink<Node, SimulationEdge>(simEdges).id((d) => d._id),
forceLink<Node, SimulationEdge>(simEdges).id((d) => d._id).distance(edgeLength.value),
);
}
});
Expand All @@ -519,7 +520,7 @@ function resetSimulationForces() {
applyForceToSimulation(
simulation.value,
'edge',
forceLink<Node, SimulationEdge>(simulationEdges.value).id((d) => d._id),
forceLink<Node, SimulationEdge>(simulationEdges.value).id((d) => d._id).distance(edgeLength.value),
);
applyForceToSimulation(
simulation.value,
Expand Down

0 comments on commit 161c7d5

Please sign in to comment.