aswathitv commented on code in PR #3162:
URL:
https://github.com/apache/incubator-kie-tools/pull/3162#discussion_r2116188851
##########
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:
To move the divider line in other DRDs we need to get the final position of
current dividerline. So once the draghandler is in end event we make the call
to move other dividers
--
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]