-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-layout #7
Comments
Agreed, the jitter while dragging a node is distracting. I would still appreciate the graph fixing itself when nodes appear or disappear, but it certainly doesn't need to do that while a node is being dragged around. Adjusting the graph once the user lets go of a dragged node should be enough. "Stickying" manually dragged nodes to the user-defined position until a full recomputation is requested makes a lot of sense. |
- Pipewire Nodes with the same name are grouped together and rendered as a single node ( #1 ), in the debug view(on pressing Ctrl), the description and node id of the underlying pipewire node is shown - Support cycles ( #5 ), graphs in cycles in them are a supported now - Add support for customizing node background colors (with transparency) - Add an Arrange button ( related to #7 ), which relayouts the nodes automatically when clicked, the layout algorithm (topological sort) is temporary, will be replaced in the future - Updated README.md to include better build instructions
- Pipewire Nodes with the same name are grouped together and rendered as a single node ( #1 ), in the debug view(on pressing Ctrl), the description and node id of the underlying pipewire node is shown - Support cycles ( #5 ), graphs in cycles in them are a supported now - Add support for customizing node background colors (with transparency) - Add an Arrange button ( related to #7 ), which relayouts the nodes automatically when clicked, the layout algorithm (topological sort) is temporary, will be replaced in the future - Updated README.md to include better build instructions
Did you have any plans regarding the layout algorithm yet? If so, feel free to just close this.
Overall I quite like the auto-layout and grouping features in patchage, although I wish it would also re-center the viewport when re-generating the layout. This is a feature I would love to see in pw-viz as well, or maybe even re-layout on the fly as nodes appear and disappear from the graph? Live re-layout should probably not touch the viewport and needs an option to toggle it on and off.
As for the algorithm itself a good start would probably be a basic mass-spring system where the nodes 1) have a "gravity" towards left/right based on their ports' directions to determine the rough initial position and 2) push each other away to avoid overlap. Links would act as springs pulling the connected nodes together. For things like effect chains I suppose it's a matter of complexity and preference whether a left-to-right or top-down flow would be preferrable. There is probably a decent heuristic to detect effect nodes (such as 'has "input" and "output" ports but no others' connected) and flip the direction in which the springs are pulling
To reduce clutter it would be handy to be able to collapse nodes into only the title and the layout algorithm could potentially collapse by default nodes that don't currently have any links. This would probably require keeping track of nodes that the user manually expands. Collapsed nodes should also probably have some indicator for what kind of ports they have, not sure what the best way to handle that would be.
The text was updated successfully, but these errors were encountered: