aswathitv commented on code in PR #3162:
URL:
https://github.com/apache/incubator-kie-tools/pull/3162#discussion_r2120376048
##########
packages/dmn-editor/src/diagram/nodes/Nodes.tsx:
##########
@@ -1161,10 +1161,34 @@ export const DecisionServiceNode = React.memo(
});
selection.call(dragHandler);
+
+ dmnEditorStoreApi.setState((state) => {
+ const dividerLineLocalY = getDecisionServiceDividerLineLocalY(shape);
+ const drds =
state.dmn.model.definitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"] ?? [];
+ for (let i = 0; i < drds.length; i++) {
+ if (i === state.computed(state).getDrdIndex()) {
+ continue;
+ }
+ const _indexedDrd = computeIndexedDrd(
+ state.dmn.model.definitions["@_namespace"],
+ state.dmn.model.definitions,
+ i
+ );
+ const dsShape = _indexedDrd.dmnShapesByHref.get(id);
+ const dsShapeYPosition = dsShape?.["dc:Bounds"]?.["@_y"];
+ if (dsShape && dsShape["dmndi:DMNDecisionServiceDividerLine"]) {
+
dsShape["dmndi:DMNDecisionServiceDividerLine"]!["di:waypoint"]![0]["@_y"] =
+ dsShapeYPosition! + dividerLineLocalY;
+
dsShape["dmndi:DMNDecisionServiceDividerLine"]!["di:waypoint"]![1]["@_y"] =
+ dsShapeYPosition! + dividerLineLocalY;
+ }
+ }
+ });
Review Comment:
Moved this code to updateDecisionServiceDividerLine mutation.
--
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]