tiagobento commented on code in PR #3162:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3162#discussion_r2116268017


##########
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:
   Ok, so that's probably not the correct place for this code, as this 
`useEffect` is managing the `drag` actions subscription... Can you do it on a 
different place? Maybe even on the `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: commits-unsubscr...@kie.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@kie.apache.org
For additional commands, e-mail: commits-h...@kie.apache.org

Reply via email to