refactor(react): add setAttributes for dimension changes
This commit is contained in:
@@ -4,7 +4,10 @@ export type NodeDimensionChange = {
|
||||
id: string;
|
||||
type: 'dimensions';
|
||||
dimensions?: Dimensions;
|
||||
/* if this is true, the node is currently being resized via the NodeResizer */
|
||||
resizing?: boolean;
|
||||
/* if this is true, we will set width and height of the node and not just the measured dimensions */
|
||||
setAttributes?: boolean;
|
||||
};
|
||||
|
||||
export type NodePositionChange = {
|
||||
|
||||
@@ -217,7 +217,7 @@ export function handleExpandParent(
|
||||
changes.push({
|
||||
id: parentId,
|
||||
type: 'dimensions',
|
||||
resizing: true,
|
||||
setAttributes: true,
|
||||
dimensions: {
|
||||
width: Math.max(dimensions.width, Math.round(expandedRect.width)),
|
||||
height: Math.max(dimensions.height, Math.round(expandedRect.height)),
|
||||
|
||||
Reference in New Issue
Block a user