Skip to main content

elk 0.4.0 copy "elk: ^0.4.0" to clipboard
elk: ^0.4.0 copied to clipboard

Partial Dart port of the Eclipse Layout Kernel: the layered algorithm with compound graphs, ports and orthogonal edge routing, and an elkjs-style API.

0.4.0 #

  • Breaking: spacings that ELK derives from spacing.baseValue are now nullable in ElkLayoutOptions and default to the ELK default times spacingBaseValue / 20, also in the constructor: spacingEdgeEdge, spacingEdgeEdgeBetweenLayers, spacingEdgeNodeBetweenLayers, spacingComponentComponent, spacingEdgeLabel, spacingNodeLabel and spacingPortLabel. With the constructor's base value 40 these spacings are twice as large as before. Read the effective values from the new resolved* getters (for example resolvedEdgeEdge). Layouts from ElkLayoutOptions.fromElkJson do not change.

  • Breaking: the between-layers edge spacings no longer fall back to spacingEdgeNode; as in ELK, they derive from spacingBaseValue.

  • Breaking: padding, direction and hierarchyHandling of ElkLayoutOptions now hold the explicit (nullable) values. Read the effective values from resolvedPadding, resolvedDirection and resolvedHierarchyHandling. paddingOverride, directionOverride and hierarchyHandlingOverride are removed.

  • Breaking: rename CenterEdgeLabelPlacementStrategy to ElkCenterEdgeLabelPlacement, EdgeLabelSideSelection to ElkEdgeLabelSideSelection, and ElkLayoutOptions.centerLabelPlacement to centerEdgeLabelPlacement. usesLabelSizeInformation() and transposed are no longer public.

  • Breaking: remove routeOrthogonal. The engine routes with the generated ELK orthogonal router.

  • Breaking: remove elkUnsupportedFeature. It always returned null.

  • Breaking: remove ElkLabel.side and ElkLabelSide. They had no effect; set elk.layered.edgeLabels.sideSelection (edgeLabelSideSelection) on the graph.

  • Breaking: remove ElkLayoutOptions.algorithm. It was never read; the package always runs the layered algorithm.

  • Breaking: remove the greedySwitchEnabled parameter of the ElkLayoutOptions constructor and copyWith. Use greedySwitchType: ElkGreedySwitch.off.

  • Remove the unused meta dependency. The porting notes no longer ship in the package.

  • Give every graph in the hierarchy its own random generator, seeded like ELK's GraphConfigurator. A nested INCLUDE_CHILDREN graph no longer draws barycenter perturbations from its parent's generator when the cycle breaker did not create one (for example DEPTH_FIRST), which could mirror a layer compared with elkjs.

  • A SEPARATE_CHILDREN compound without elk.direction now uses ELK's default direction (RIGHT) instead of its parent's direction, as in elkjs.

  • Lay out a SEPARATE_CHILDREN compound inside an INCLUDE_CHILDREN hierarchy on its own first, as ELK's recursive layout engine does. Its connected components are now split and packed in rows, as in elkjs.

  • Generate the ordering-constraint resolver and first-layer randomization from ELK 0.12.2. The layer sweep now also applies constraints to its first layer.

  • Use network-simplex layer assignment generated from ELK 0.12.2 by default. This corrects the layer of one node in the official Trilateration model.

  • Use pure-Dart cycle breaking generated from ELK 0.12.2 by default for all five supported strategies.

  • Generate the two edge-crossing counts used during layer ordering from ELK 0.12.2. Edges joining distinct ports on one node now participate in the count.

  • Generate the port distributor used during layer sweeps from ELK 0.12.2.

  • Generate core barycenter and crossing-count routines from Eclipse ELK 0.12.2. Layout remains synchronous and pure Dart. Barycenter perturbations and port ranks now follow upstream Java float rounding, which can affect close ties.

0.3.0 #

  • layered: keep the model-order transitive closure out of the plain barycenter sort. A wide layer no longer costs O(n² log n × closure size) per sort; a 918-node graph lays out in 0.12 s instead of 521 s, with identical output. The preferEdges model-order strategy does not read the closure and no longer maintains it either.
  • Breaking: free ports are spread evenly along a node side, as ELK's default DISTRIBUTED alignment does (#93). Before, they were packed 10 px apart at the centre of the side. Port positions and edge routes of existing layouts change, and no option restores the old placement.
  • Keep free ports inside spacing.portsSurrounding on the sides edges use, as elkjs does.

0.2.1 #

  • Remove the unused vendored copy of dart_dagre from lib/src/dagre and its NOTICE. The layered engine does not use it.

0.2.0 #

  • Implement distinct INCLUDE_CHILDREN, SEPARATE_CHILDREN, and INHERIT modes, including JSON aliases and independent direction/hierarchy inheritance. Separated cross-boundary edges remain in the result without route sections or fabricated label positions. Full coordinated hierarchy optimization remains outside the supported contract.
  • Preserve deep hierarchy endpoints, labels, and orthogonal boundary routes across nested directions and compound title bands.
  • Correct four-side explicit port placement, outward edge attachment, and internal compound-boundary attachment. Preserve self-loop clearance beyond nonzero port rectangles and reserve matching layout margins.
  • Place edge, node, and port labels; support crossing constraints and hyperedge junctions; improve self-loop sizing and edge straightening.
  • Honor cycle-breaking, model-order, edge-merging, and Brandes–Köpf alignment choices exposed by the public API.
  • Parse standard ELK option aliases and spacing keys while retaining legacy aliases. Honor explicit asymmetric root padding in all four directions.
  • Include ports, labels, routed strokes, and loops in returned layout bounds.

0.1.1 #

  • Fixed explicit north/south ports attaching to the opposite side of nodes in ElkDirection.up layouts.

0.1.0 #

  • Initial release.
  • Ports: ElkPort.side / ElkPortSide; edges may reference port ids and attach at computed border points (ElkPositionedNode.ports).
  • elkjs JSON ingestion: ElkGraph.fromJson (and fromJson on nodes/edges/ ports/labels) parse the elkjs graph JSON shape.
  • Validation harness (tool/validation/) comparing structural agreement against real elkjs.
  • ELK-style layered layout: cycle breaking, network-simplex layering, crossing minimization, Brandes–Köpf coordinate assignment.
  • Orthogonal edge routing with computed bend points and parallel-edge lanes.
  • Compound graphs / clusters with parent-relative result coordinates.
  • ELK spacing model (spacing.baseValue), model order constraints, and Brandes–Köpf fixed-alignment options.
  • elkjs-style graph API (ElkGraph / ElkNode / ElkEdge → ElkResult).
0
likes
160
points
21.3k
downloads

Documentation

API reference

Publisher

verified publisherroszkowski.dev

Weekly Downloads

Partial Dart port of the Eclipse Layout Kernel: the layered algorithm with compound graphs, ports and orthogonal edge routing, and an elkjs-style API.

Repository (GitHub)
View/report issues
Contributing

Topics

#layout #graph #elk #diagram #visualization

License

MIT (license)

More

Packages that depend on elk