Skip to content

Make a deep copy of the network for simulationLinks#134

Merged
JackWilb merged 1 commit intomasterfrom
deep-copy-network
Dec 16, 2020
Merged

Make a deep copy of the network for simulationLinks#134
JackWilb merged 1 commit intomasterfrom
deep-copy-network

Conversation

@JackWilb
Copy link
Copy Markdown
Member

@JackWilb JackWilb commented Dec 11, 2020

Closes #130

I decided to use a JSON.parse(JSON.stringify()) since the data that we get from MultiNet is made of properties that are all JSON serializable, and there's no easier option that doesn't require importing more libraries.

This means that the simulation doesn't update the source and target properties on the links in the store with references to the nodes that are the source and target.

@JackWilb JackWilb requested a review from waxlamp December 11, 2020 00:07
@JackWilb
Copy link
Copy Markdown
Member Author

Rebased onto master and resolved the conflict caused by change from #124 (comment).

Comment thread src/components/MultiLink/MultiLink.vue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simulation links should be set from a deep copy so that the links in network are untouched

2 participants