Home > @jsplumbtoolkit/layout-force-directed > ForceDirectedLayoutParameters > r
ForceDirectedLayoutParameters.r property
The amount of travel to impose on each element every time a repulsion or attraction event occurs during the calculation of the layout. This is expressed as a fraction of the distance the two elements would travel in order to be spacing
pixels apart. Defaults to 0.25. A value of 1 here may seem desirable but in general will not provide the best results: moving one pair of elements by their ideal amount can negatively affect many others. It is better to provide a fractional value here and allow the layout to compromise.
Signature:
r?: number;