-
Notifications
You must be signed in to change notification settings - Fork 98
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
Widths and heights getting reversed #313
Comments
This looks like a duplicate of eclipse-elk/elk#1033 |
ah crap. Ok, that seems to have made it stop but now nothing is working :( |
@Eddykasp Any reason why edges wouldn't generate sections since I removed that option? Seems it just straight up stopped working entirely 😱 |
The problem is that edges that cross hierarchies can only be routed correctly using the Here is a minimal example. |
and by "crossing hierarchies" you mean having an edge point at the child of another node? And to fix, I'd need to create an external port that other nodes point to, and then "internally" have the external port point at the "correct" port. I'm guessing by nature of how the layout algorithm works, given the internal ports are in a fixed position, it should rearrange the external ports (given they will have no width/height on them) to the apporpiate location? |
Yes exactly, the layout is performed recursively from the bottom up, so internal port positions would be determined first and then the outer layout needs to deal with whatever positions they have. This isn't as powerful as the includeHierarchy option as that would be able to perform crossing minimisation over multiple hierarchies but for many cases it can still work well. Hope this helps and if you need further advice, feel free to ask :) |
Awesome. Thanks for your prompt replies! I've been having one other big issue that hopefully I can resolve (or can find an existing ticket) on my own. Should I keep this issue open or close it since it's a duplicate of the other. |
For anyone who comes here later. This is super hacky and a workaround, but it did work for me. Basically most of my scenarios my edges didn't cross the "hierarchy boundaries", so all I had to do is when it did, just flip my width and height values for the And my stuff worked fine. B/c for your nodes that don't have edges that cross the boundaries, it still works fine. This means you can keep HierarchyHandling: includeChildren which works great when it works. |
Describe the bug
I'm trying to generate an electrical SLD using the lib. So far it works great for most things but for some reason, with a particular setup, it's taking my widths and making it the height and then the width becomes some random value (I can't decipher how it's getting anyways). In the screen shot below, the top bit of JSON is the pre elk.layout call and the second bit is after it's put through the engine.
Expected behavior
When I set widths and heights for nodes and children, it should be respected.
Screenshots
ELK Version
"elkjs": "^0.9.3",
Additional context
Structure pre engine. All ids are in our dev db so they aren't particularly sensitive. So I didn't obfuscate them here. This is the raw json dump.
It's important that the widths I set are respected. So it might just be a config issue? But seems like this is a bug so apologies if this is just a bad config.
I have attempted to just reverse the MINIMUM layout option for this scenario but it isn't consistent so that doesn't work :( And I shouldn't have to do that anyways haha. It threw me off for a while b/c I thought I kept getting the minimum wrong and it was (height, width) not (width, height).
The text was updated successfully, but these errors were encountered: