Liran Sharir
Aug 26, 2017 · 1 min read

Hey Ashkan!

I don’t think it’s a change detection problem. I believe d3 require to re-initialize the links forces. By calling this method:

this.simulation.force('links',
d3.forceLink(this.links).strength(FORCES.LINKS)
)

Every time you add a link to the this.links array. Otherwise, the physical model will not acknowledge new links you pushed to your array.

)
    Liran Sharir

    Written by

    Developer, Physicist, Mathematician.

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade