refactor(node-resizer): pass latest dimensions to onEnd handler #5083

This commit is contained in:
moklick
2025-04-02 19:45:15 +02:00
parent 3e708c9562
commit cc64a1902a
2 changed files with 8 additions and 4 deletions
@@ -142,11 +142,15 @@ function ResizeControl({
triggerNodeChanges(changes);
},
onEnd: () => {
onEnd: ({ width, height }) => {
const dimensionChange: NodeDimensionChange = {
id: id,
type: 'dimensions',
resizing: false,
dimensions: {
width,
height,
},
};
store.getState().triggerNodeChanges([dimensionChange]);
},