eclipse-sprotty / sprotty

A diagramming framework for the web
https://sprotty.org/
Eclipse Public License 2.0
731 stars 83 forks source link

Do not set bend points on elk edge when transforming from Sprotty edge #436

Closed jbicker closed 9 months ago

jbicker commented 9 months ago

Fixes https://github.com/eclipse-sprotty/sprotty/issues/427

The bend points are now completely neglected in the edge transformation from SEdge to an ElkExtendedEdge. So elk sets completely new bend points.

Feels a bit like a naive fix but it works at least for the random graph example. I hope it does not break something else.

jbicker commented 9 months ago

@spoenemann, thanks for the hint. I did as you proposed.

spoenemann commented 9 months ago

Hmmm, it seems to me that the root of the problem is somewhere else. The elkjs library uses this ELK Java/Xtend class method to transfer the layout algorithm results to the JSON data: https://github.com/kieler/elkjs/blob/72b471e65f5c5d7b0e94450b14c14bdf12384f82/src/java/org/eclipse/elk/js/ElkJs.java#L206

I created https://github.com/eclipse/elk/issues/1001 to discuss and possibly fix this in ELK.

jbicker commented 9 months ago

Could this PR then be closed?

spoenemann commented 9 months ago

I think so yes. The current solution smells like a workaround for a problem that lies somewhere else.