trassel
Version:
Graph computing in JavaScript
22 lines (21 loc) • 978 B
TypeScript
/**
* Creates a rectangular connection graph layout.
* @param {(import("../model/ibasicnode").IBasicNode) => number} groupBy - Optional function to group nodes
* @param {boolean=} isVerticalLayout - If true the tree will be top to bottom, otherwise it will be left to right
* @param {number=} padding - Minimum padding between nodes described in pixels
* @param {number=} centerX - Center X coordinate of the component
* @param {number=} centerY - Center Y coordinate of the component
*/
export default class Connections extends LayoutComponent {
constructor(groupBy?: null, isVerticalLayout?: boolean, padding?: number, centerX?: null, centerY?: null);
groupBy: any;
isVerticalLayout: boolean;
PADDING_PX: number;
centerX: number | null;
centerY: number | null;
nodePositions: Map<any, any>;
getWidth(node: any): any;
getHeight(node: any): any;
initialize(...args: any[]): void;
}
import LayoutComponent from "./layoutcomponent";