jomarko commented on code in PR #2254:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2254#discussion_r1579023087


##########
packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx:
##########
@@ -63,6 +68,12 @@ export function ShapeOptions({
   const boundPositionX = useMemo(() => +(shapeBound?.["@_x"]?.toFixed(2) ?? 
""), [shapeBound]);
   const boundPositionY = useMemo(() => +(shapeBound?.["@_y"]?.toFixed(2) ?? 
""), [shapeBound]);
 
+  // this variable was introduced because of scenarios, when user switches 
between nodes without closing and reopening the properties panel
+  const [currentlyReShapedNodeId, setCurrentlyReShapedNodeId] = 
useState<string>(nodeIds[0]);

Review Comment:
   I am sorry, I was not able to incorporate this, I tried a lot, but still the 
corner case was not working. Will describe the corner case more here.
   
   - Imagine we have a diagram with two nodes, lest say **A** and **B**
   - Lets resize them, you can use drag handler in the corner of the node, to 
make the behavior obvious, for the **A** lets increase its width and for the 
**B** lets increase its height
   - Now, please open **A** properties panel, its Shape section, set focus to 
its **width** field, i.e. click into it, or use **Tab** until the cursor is in 
the **width**
   - Keep the focus in the **width** and keep the Properties panel open please
   - Now, click the node **B**, i.e. select the node **B**
   - ❗ here you will see that the node **B** **width** was automatically set to 
the **width** of the node **A**. If we put breakpoints into the 
**onBlurWidth**, we will see that in the time of its execution the blur 
**event.target.value** contain **width** of the node **A**, however the 
**nodeIds[0]** is already equal of the node **B**
   



-- 
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]

Reply via email to