kieler / elkjs

ELK's layout algorithms for JavaScript
Other
1.76k stars 97 forks source link

Question about alignment #239

Closed Vesper0704 closed 7 months ago

Vesper0704 commented 1 year ago

Hi, I wonder what's the difference between alignment and contentAlignment ? They seem to fail to work in some cases(eg. alignment: CENTER fails to make the nodes align), is there any precondition for them to take effect, or maybe some options can override them? Thanks!

soerendomroes commented 1 year ago

alignment positions nodes appropriately inside the layer bonds as seen here. contentAlignment works for the content, as seen here.

Vesper0704 commented 1 year ago

Thanks! that's much more clear to me