Skip to Content
参考手册组件

<NodeResizeControl />

GitHub 上的源代码

¥Source on GitHub

要创建自己的调整大小 UI,你可以使用 NodeResizeControl 组件,你可以在其中传递子项(例如图标)。

¥To create your own resizing UI, you can use the NodeResizeControl component where you can pass children (such as icons).

属性

¥Props

对于 TypeScript 用户,<NodeResizeControl /> 组件的 props 类型导出为 ResizeControlProps

¥For TypeScript users, the props type for the <NodeResizeControl /> component is exported as ResizeControlProps.

NameTypeDefault
nodeIdstring

Id of the node it is resizing.

colorstring

Color of the resize handle.

minWidthnumber

Minimum width of node.

10
minHeightnumber

Minimum height of node.

10
maxWidthnumber

Maximum width of node.

Number.MAX_VALUE
maxHeightnumber

Maximum height of node.

Number.MAX_VALUE
keepAspectRatioboolean

Keep aspect ratio when resizing.

false
shouldResizeShouldResize

Callback to determine if node should resize.

onResizeStartOnResizeStart

Callback called when resizing starts.

onResizeOnResize

Callback called when resizing.

onResizeEndOnResizeEnd

Callback called when resizing ends.

positionControlPosition

Position of the control.

variantResizeControlVariant

Variant of the control.

"handle"
resizeDirectionResizeControlDirection

The direction the user can resize the node. If not provided, the user can resize in any direction.

classNamestring
styleCSSProperties
childrenReactNode
Last updated on