Skip to content
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

Force the positioning of a node #226

Open
CrashLaker opened this issue Jun 12, 2023 · 3 comments
Open

Force the positioning of a node #226

CrashLaker opened this issue Jun 12, 2023 · 3 comments
Labels

Comments

@CrashLaker
Copy link

hi all,
just bumped to this amazing library. thanks!

wondering if there's a way to force the position of a node.

for example i'd like to force the position of the leftmost node to the middle of the diagram

image

@CrashLaker CrashLaker added the bug label Jun 12, 2023
@soerendomroes
Copy link
Member

Please have a look at this blogpost.
TLDR: It is possible to constrain the relative position of nodes, but not the coordinates and you have to constrain all of them in some way.

@soerendomroes
Copy link
Member

You can also set a different node placement strategy https://www.eclipse.org/elk/reference/options/org-eclipse-elk-layered-nodePlacement-strategy.html or try setting bk.fixedAlignment to BALANCED for the default BRANDES_KOEPF strategy.

@CrashLaker
Copy link
Author

maan! awesome.
thank you for the fast reply.

worked with:
'elk.layered.nodePlacement.bk.fixedAlignment': 'BALANCED',

tyty!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants