dagrejs / dagre

Directed graph layout for JavaScript
MIT License
4.72k stars 606 forks source link

Align nodes to the left - UL not working as intended #313

Open FriesBureau opened 3 years ago

FriesBureau commented 3 years ago

Hi

I can't get the nodes to align to the left, only for the first node.

billede

Here are my settings: align: 'UL', acyclicer: 'greedy', nodesep: 50, ranksep: 50, edgesep: 50, marginx: 50, marginy: 50

I checked the code node_modules/dagre/lib/position/bk.js, but I fail to see how it is possible to align all nodes to the left.

If I disable alignment then the last node will align to the left, but the first node keeps some distance to the left.

billede

knightswatch3 commented 3 years ago

@FriesBureau How did you get those custom nodes ?