-
Notifications
You must be signed in to change notification settings - Fork 88
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
What is the best strategy / approach for balancing and aligning the contents of a node with the graph #1029
Comments
Hi, have you tried using a port (that looks like a node) with a fixed position instead? Currently, top node of the inner graph does not seem to be connected to the outside. If this produces bends, I suggest to add straightness priority to the edges that require it. Adjusting the padding has the problem that this would change the size of a node, hence you would need to post process the drawing and adjust all node positions. |
@soerendomroes yes thats what im running into with the padding solution, finding i would need to run the layout when I make an adjustment. I think what you are suggesting, and correct me if I am wrong, is the fixed positioned ports correct? So i would take the outer nodes in port, on the north side, and set its position fixed to where it would look centered against the first inner node? |
Yes, but it has a similar problem that you need to know where the center actually is before you know how big the node might be. |
agreed - thanks for your feedback - i will dive into the fixed positioned port solution :) |
@soerendomroes i tried that port solution, starting running into issues due to needing fixed position and the layout algorithm. Solution ended up being a lot simpler. I configured the model to be setup for hierarchy in a better way, by setting the hierarchy handling to include children and setting merge hierarchy edges to false - then I was able to set the edges to connect directly to the first inner node. Problem solved! lol thanks for all your help. |
Trying to create a link to the model errors so I am attaching the json.
scratch_548.json
So our goal is to center and balance the contents of the child nodes so that the edge leading to the hierarchy / wrapping node, would end at the center of the first child node.
The wrapping / parent nodes will not be shown to our users, so for our users, we want it to look like the edge leads to the first child node - same for the last child node and the edge leaving the wrapping / parent node.
Solutions we thought of:
OR
Seems each approach has its own pros and cons. I've worked on the padding solution but run into some issues, so was hoping to get some feedback on what the best approach might be or alternative approaches.
Thanks in advance!
The text was updated successfully, but these errors were encountered: