trassel
Version:
Graph computing in JavaScript
14 lines (13 loc) • 636 B
TypeScript
/**
* Collision component that stops nodes from colliding (and thus overlapping)
* Note that this component considers all nodes to be circles. If a node is square then the maximum measurement will be considered the diameter.
* @param {number=} strength - The strength of the collision repulsion
* @param {number=} radiusPadding - Padding that will be added to all radiuses
*/
export default class Collision extends LayoutComponent {
constructor(strength?: number, radiusPadding?: number);
strength: number;
radiusPadding: number;
initialize(...args: any[]): void;
}
import LayoutComponent from "./layoutcomponent";