<NodeResizeControl />
要创建自己的大小调整 UI,您可以使用 NodeResizeControl
组件,您可以在其中传递子元素(例如图标)。
属性
对于 TypeScript 用户,<NodeResizeControl />
组件的属性类型以 ResizeControlProps
导出。
名称 | 类型 | 默认值 |
---|---|---|
# 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? | string |
|
# class? | string |
|
# children? | React.ReactNode |
|
# shouldResize? | (事件: D3.DragEvent, 参数: ResizeParams & { 方向: number[] }) => boolean |
|
# onResizeStart? | (事件: D3.DragEvent, 参数: ResizeParams) => void |
|
# shouldResize? | (事件: D3.DragEvent, 参数: ResizeParams & { 方向: number[] }) => boolean |
|
# onResizeEnd? | (事件: D3.DragEvent, 参数: ResizeParams) => void |
|