<NodeResizeControl />
要创建您自己的调整大小 UI,您可以使用 NodeResizeControl
组件,您可以在其中传递子元素(例如图标)。
Props
对于 TypeScript 用户,<NodeResizeControl />
组件的 props 类型导出为 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? | React.CSSProperties |
|
# className? | string |
|
# children? | React.ReactNode |
|
# shouldResize? | (event: D3.DragEvent,params: ResizeParams & { direction: number[] }) => boolean |
|
# onResizeStart? | (event: D3.DragEvent,params: ResizeParams) => void |
|
# shouldResize? | (event: D3.DragEvent,params: ResizeParams & { direction: number[] }) => boolean |
|
# onResizeEnd? | (event: D3.DragEvent,params: ResizeParams) => void |
|