From a9ed9ad7e3fec636dd13c455b7931c0894cbe486 Mon Sep 17 00:00:00 2001 From: Tobias Ortmayr Date: Thu, 5 Sep 2024 12:12:12 +0200 Subject: [PATCH] GLSP-1401: Fix weighted edge creation (#98) Fixes https://github.com/eclipse-glsp/glsp/issues/1401 --- .../src/common/workflow-edge-creation-checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/workflow-server/src/common/workflow-edge-creation-checker.ts b/examples/workflow-server/src/common/workflow-edge-creation-checker.ts index da45ef4..6addee0 100644 --- a/examples/workflow-server/src/common/workflow-edge-creation-checker.ts +++ b/examples/workflow-server/src/common/workflow-edge-creation-checker.ts @@ -21,7 +21,7 @@ import { ModelTypes } from './util/model-types'; @injectable() export class WorkflowEdgeCreationChecker implements EdgeCreationChecker { isValidSource(edgeType: string, sourceElement: GModelElement): boolean { - return edgeType !== ModelTypes.WEIGHTED_EDGE && sourceElement.type === ModelTypes.DECISION_NODE; + return edgeType === ModelTypes.WEIGHTED_EDGE && sourceElement.type === ModelTypes.DECISION_NODE; } isValidTarget(edgeType: string, sourceElement: GModelElement, targetElement: GModelElement): boolean { return (