ljmotta commented on code in PR #2254:
URL:
https://github.com/apache/incubator-kie-tools/pull/2254#discussion_r1576556431
##########
packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx:
##########
@@ -63,6 +68,9 @@ export function ShapeOptions({
const boundPositionX = useMemo(() => +(shapeBound?.["@_x"]?.toFixed(2) ??
""), [shapeBound]);
const boundPositionY = useMemo(() => +(shapeBound?.["@_y"]?.toFixed(2) ??
""), [shapeBound]);
+ const [width, setWidth] = useState<number>(boundWidth);
+ const [height, setHeight] = useState<number>(boundHeight);
Review Comment:
@jomarko that's true, we will have this problem. We'll also have another
problem: resizing the node using the node handler instead of using the
properties panel will not update the properties panel as well. Meaning we need
to keep the state in sync with the `boundWidth`/`boundHeight`. To do that, we
can use an `useEffect`.
--
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]