This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 5f743c057e9 kie-issues#881: On the DMN Editor, resizing an empty 
Decision Service shouldn't let its divider line stay out of its bounds (#2145)
5f743c057e9 is described below

commit 5f743c057e927af541a094f878587e7c9e5b0368
Author: Tiago Bento <[email protected]>
AuthorDate: Tue Feb 6 18:25:36 2024 -0500

    kie-issues#881: On the DMN Editor, resizing an empty Decision Service 
shouldn't let its divider line stay out of its bounds (#2145)
---
 packages/dmn-editor/src/mutations/resizeNode.ts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/packages/dmn-editor/src/mutations/resizeNode.ts 
b/packages/dmn-editor/src/mutations/resizeNode.ts
index 706792cec3d..132dc7c6019 100644
--- a/packages/dmn-editor/src/mutations/resizeNode.ts
+++ b/packages/dmn-editor/src/mutations/resizeNode.ts
@@ -32,6 +32,7 @@ import { MIN_NODE_SIZES } from 
"../diagram/nodes/DefaultSizes";
 import { NODE_TYPES } from "../diagram/nodes/NodeTypes";
 import { SnapGrid } from "../store/Store";
 import { addOrGetDrd } from "./addOrGetDrd";
+import { DECISION_SERVICE_DIVIDER_LINE_PADDING } from 
"./updateDecisionServiceDividerLine";
 
 export function resizeNode({
   definitions,
@@ -68,6 +69,10 @@ export function resizeNode({
   if (change.nodeType === NODE_TYPES.decisionService) {
     const ds = definitions.drgElement![change.index] as 
DMN15__tDecisionService;
 
+    const dividerLineY =
+      
shape["dmndi:DMNDecisionServiceDividerLine"]?.["di:waypoint"]?.[0]?.["@_y"] ?? 
shapeBounds["@_y"];
+    limit.y = dividerLineY + DECISION_SERVICE_DIVIDER_LINE_PADDING;
+
     // We ignore handling the contents of the Decision Service when it is 
external
     if (!change.isExternal) {
       ds.encapsulatedDecision?.forEach((ed) => {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to