// Heat a running layout back up (118.3), by calling the impl's optional reheat()
layout.reheat(alpha?: number): thisHeat a running layout back up (118.3), by calling the impl's optional reheat(). A force layout's infinite run ticks only while its field is moving and reheats itself on a drag, a moved node and an added or removed element; this is for a change it cannot see — an edge length that changed under a data mapping, a style that resized the boxes. An impl without one ignores it.
| Name | Description |
|---|---|
alpha: number? | the temperature to restore; the force layout's default is 0.3, d3's drag convention |
Returns
thisthis layout, for chaining
Example
const force = cy.layout({ name: 'force', infinite: true, executor: 'cpu' });force.run();force.reheat(0.5);force.stop();await force.promise();console.log(cy.nodes().length); // 3