<NodeResizeControl />
To create your own resizing UI, you can use the NodeResizeControl
component where you can pass children (such as icons).
Props
For TypeScript users, the props type for the <NodeResizeControl />
component is exported
as ResizeControlProps
.
Name | Type | Default |
---|---|---|
# nodeId | string |
|
# position? | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" |
|
# variant? | "handle" | "line" |
|
# keepAspectRatio? | boolean |
|
# minWidth? | number |
|
# maxWidth? | number |
|
# minHeight? | number |
|
# maxHeight? | number |
|
# color? | string |
|
# style? | React.CSSProperties |
|
# className? | string |
|
# children? | React.ReactNode |
|
# shouldResize? | (event: D3.DragEvent, params: ResizeParams & { direction: number[] }) => boolean |
|
# onResizeStart? | (event: D3.DragEvent, params: ResizeParams) => void |
|
# onResize? | (event: D3.DragEvent, params: ResizeParams & { direction: number[]; }) => void |
|
# onResizeEnd? | (event: D3.DragEvent, params: ResizeParams) => void |
|