graph-editor icon indicating copy to clipboard operation
graph-editor copied to clipboard

Tail connection not rendered when connector has multiple connections

Open syluna opened this issue 1 year ago • 3 comments

When a connector has multiple connections and we want to move one, the connection currently being drawn completely disappears. image This fail exist during version 1.4.

To fix issue in master (work on older version to but with previous package name) : In io.github.eckig.grapheditor.core.connections.ConnectorDragManager In method private void detachConnection(final MouseEvent event, final GConnector connector) { Replace line : if (!followUpCreated && checkCreatable(opposingConnector)) { by this one : if (!followUpCreated && (checkCreatable(opposingConnector) || opposingConnector == newSource)) {

syluna avatar May 24 '24 08:05 syluna

First: Thanks for looking into this!

But: I can not reproduce the issue. Can you tell me a little bit more about the general settings of your editor?

  • Do you allow multiple incoming connections?
  • Do you have connectionDetachedOnDrag enabled or disabled?

eckig avatar May 27 '24 10:05 eckig

In my model I allow multiple incomming connection on input connector only. connectionDetachedOnDrag is enabled with default handler. In the picture you can show the incomming connection on the top box. When I detach the link on other box (output connector) the tail of connection disapear.

syluna avatar May 27 '24 11:05 syluna

The problem is: Currently the graph-editor only in part supports multiple incoming connections on a single connector.

So my fear is, that we only cover some things up with your proposed patch. The "correct" way would be, to add a proper support for this use case.

eckig avatar May 27 '24 13:05 eckig