Closed vbo75 closed 1 year ago
@vbo75 Could you share an example (visually) of what you'd like to accomplish?
As you can see in the following screen capture diagram-js (I tested v12) supports connecting connections to connections:
Alternatively you can share a codesandbox or a demo of your archimate modeler that we can look into to inspect.
Ok, let me test on diagram v12 to see if I still have this bug.
Hi, I still have the same bug on diagram v12. I looked at bpmn-js source code to understand how your sample works. It's using modeling.updateWaypoints, not modeling.reconnectStart or modeling.reconnectEnd as I do. I'll prepare a codesandbox in case you want to look into.
@vbo75 A code sandbox would be apprechiated. You can also share a running example of archimate-js that suffers from this issue. Anything really that we can debug and use to reproduce.
@vbo75 Any progress?
Closing this issue due to inactivity.
Context
I develop an ArchiMate modeling engine builds on diagram-js library. In Archimate, it’s allowed to connect a connection to a shape with a specific connection type. (see also : https://forum.bpmn.io/t/update-waypoints-between-two-connections/8789)
In this case, when there is a connection (called A connection) between a shape and another connection (called B connection), if B connection move voluntarily or not, we need to reconnect A connection to B connection. Reconnect depends on A connection type : incoming or outgoing connection of B connection.
As connecting connections to connections isn’t standard behavior, I developed a hook to capture essential information (old waypoints or docking points) and after, call Modeling.reconnectStart or Modeling.reconnectEnd with the new calculated waypoint.
}, true);
When A connection is an incoming connection, modeling.reconnectEnd is ok and A connection is well reconnected to B connection.
Bug
When A connection is an outgoing connexion, modeling.reconnectStart does not work. connectionEnd and connectionStart point to the same waypoint. hints passed in context to connection.reconnect event define a new connectionEnd waypoint instead of connectionStart : { hints: { connectionEnd: {x: 402.5, y: 315}, connectionStart: false, docking: "source" }
Expected Behavior
Good context hints param for connection.reconnect event : { hints: { connectionEnd: false, connectionStart: {x: 402.5, y: 315}, docking: "source" }
Environment