jomarko commented on code in PR #2546:
URL:
https://github.com/apache/incubator-kie-tools/pull/2546#discussion_r1766220071
##########
packages/dmn-editor/src/diagram/connections/isValidConnection.ts:
##########
@@ -39,14 +39,18 @@ export function checkIsValidConnection(
export function _checkIsValidConnection(
sourceNode: { type?: string; data: DmnDiagramNodeData } | undefined,
targetNode: { type?: string; data: DmnDiagramNodeData } | undefined,
- edgeType: string | null | undefined
+ edgeType: string | null | undefined,
+ extraArg?: {
+ allowExternalTarget: boolean;
+ }
) {
if (!sourceNode?.type || !targetNode?.type || !edgeType) {
return false;
}
- // External nodes cannot be targeted
- if (targetNode.data.dmnObjectQName.prefix) {
+ // External nodes cannot be targeted by default
+ // However there are exceptions, for example adding a waypoint on the edge
+ if (!extraArg?.allowExternalTarget && targetNode.data.dmnObjectQName.prefix)
{
Review Comment:
@danielzhe done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]