dagrejs / dagre

Directed graph layout for JavaScript
MIT License
4.48k stars 596 forks source link

Layout with a set of predefined nodes positions? #162

Open pombredanne opened 9 years ago

pombredanne commented 9 years ago

@cpettitt I wonder if it would be possible to start a layout with certain nodes that have a predefined position? The goal is to incrementally render dot files that are eventually too big to display (and process reasonably by graphviz). So the approach would be to render some nodes and the support some nav "expand nodes" and then remove some nodes and add new ones based on that navigation. The nodes that would be expanded would keep their original position, the new added nodes/edges would need layout. Removed nodes/edges would be removed from the display. Does this sounds crazy?

DavidSouther commented 5 years ago

+1 - we have a use case where uses can drag & drop nodes after layout; being able to pin those node is essential. While we could add a {px, py} and use those preferentially, having dagre able to respect some notion of pinning would be very helpful.