pict-provider-graphlayout
v1.0.0
Published
Pure node-placement algorithms and edge-routing themes for graph canvases. Dependency-free descriptors extracted from pict-section-flow so the layout and routing math is reusable and testable on its own. The path-generation math joins here in a later step
Readme
pict-provider-graphlayout
Pure, DOM-free node-placement algorithms and edge-routing themes for graph
canvases. Extracted from pict-section-flow so the layout and routing logic is
reusable and testable on its own.
What is here
Layouts- node-placement algorithm descriptors{ Name, Label, Apply, DefaultParameters, ParameterSchema }: Custom, Layered, Staggered, ForcedFromCenter, Grid, Circular, Tabular, Columnar, plus theCoerceandRankhelpers they build on.Edges- edge-routing theme descriptors{ Name, GeneratePath, ... }: Bezier, Orthogonal, Straight, OrthogonalSnap, Perimeter, PerimeterLinear, PerimeterOrthogonal, plus thePerimeterMathhelper.
Usage
const libGraphLayout = require('pict-provider-graphlayout');
const tmpGrid = libGraphLayout.Layouts.Grid; // a layout descriptor
const tmpBezier = libGraphLayout.Edges.Bezier; // an edge-theme descriptorpict-section-flow's Layout service registers these through its
registerAlgorithm / registerEdgeTheme API. Any host that wants the same
algorithms without the flow view can register them the same way.
Status
Extracted in Phase 1b of the pict-section-flow 2.0 plan. The path-generation
math (bezier and orthogonal routing) joins here next as a geometry-injected core,
at which point this module depends on pict-provider-graphgeometry.
