danielzhe commented on code in PR #2602:
URL:
https://github.com/apache/incubator-kie-tools/pull/2602#discussion_r1766064168
##########
packages/dmn-editor/src/mutations/updateExpressionWidths.ts:
##########
@@ -30,20 +30,9 @@ export function updateExpressionWidths({
drdIndex: number;
widthsById: Map<string, number[]>;
}): void {
- const { widthsExtension, widths } = addOrGetDrd({ definitions, drdIndex });
- const componentWidthsMap = widths.reduce(
Review Comment:
The issue was that we were always reloading all the widths from the
`definitions` into the `widthsById`.
They are loaded the first time here:
https://github.com/apache/incubator-kie-tools/blob/e21bbd8b7bc00bd36868af4b48ac3109048b4f3f/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx#L146
And then the Boxed Expression Editor is who changes the `widthsById`.
The `updateExpressionWidth` should only update the `definitions` from
`widthsById`, not fill the `widthsById`.
--
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]