eclipse / elk

Eclipse Layout Kernel - Automatic layout for Java applications.
https://www.eclipse.org/elk/
Other
258 stars 86 forks source link

Need a way to avoid bendpoints from getting created #1032

Closed badrinarayan-R83 closed 2 months ago

badrinarayan-R83 commented 7 months ago

We are using elk layout for glsp based diagrams. We use ElkLayoutEngine.initialize(new LayeredMetaDataProvider()); to use layered algorithm The layout is fine for shapes and layered algorithm suits our requirement

image

But when we move the shape State2 down, an unnecessary bendpoint is created as highlighted in red. The bendpoint is created at the point where the shape existed before the movement. image

We would have wanted a direct connection from circle to shape State2 without any bendpoint. Something like this image

Do you know how we can fix this issue (like setting some elk property) ? Note: FixedLayout doesn't work fine for our requirement

badrinarayan-R83 commented 7 months ago

Hi, any update ?

Eddykasp commented 7 months ago

Hi @badrinarayan-R83, as far as I'm aware there is no way to do this directly in ELK using the layered algorithm as the algorithm was developed with clean and readable edge routing in mind. The easiest way to achieve your goal would probably to remove the bendpoints in a post-processing step if you are certain you don't need them.

I don't really know how glsp uses elk though. Ideally you should recreate your graph in elk-live so we can see what options you are using and what your graph looks like.

soerendomroes commented 2 months ago

This is a duplicate of #1001