trassel
Version:
Graph computing in JavaScript
20 lines (19 loc) • 922 B
TypeScript
/**
* Creates a fan component that pushes groups of nodes into a fan formation
* @param {(any => "string")} computeGroup - A function that will take the node as an argument and return a group ID.
* @param {number=} strength - How strong should the pull be? (0-1)
* @param {number=} space - How many pixels from the center should the first node be drawn?
* @param {number=} centerX - Center X coordinate of the component
* @param {number=} centerY - Center Y coordinate of the component
*/
export default class Fan extends LayoutComponent {
constructor(computeGroup?: (node: any) => any, strength?: number, space?: number, centerX?: null, centerY?: null);
computeGroup: (node: any) => any;
strength: number;
positionMap: Map<any, any>;
centerX: number | null;
centerY: number | null;
space: number;
initialize(...args: any[]): void;
}
import LayoutComponent from "./layoutcomponent";