d3.js - Slowing down link animation in D3 force layout -
in force layout, i'd slow down animation when 2 distant nodes linked.
for example: if have 2 nodes 400px apart , link established between them (after inital tick has cooled down), i'd link start @ 400px , animate down towards 100 (or standard link distance set).
you can set linkstrength lower value make linking less abrupt. so:
force.linkstrength(0.1);
linkstrength value between 0 , 1. https://github.com/mbostock/d3/wiki/force-layout#linkstrength
Comments
Post a Comment