2023-11-11 22:32:40 +08:00
|
|
|
---
|
|
|
|
title: ScrollCanvas
|
2023-11-12 13:52:11 +08:00
|
|
|
order: 12
|
2023-11-11 22:32:40 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
## allowDragOnItem
|
|
|
|
|
|
|
|
**Type**: `boolean` | `{node?: boolean; edge?: boolean; combo?: boolean}`
|
|
|
|
|
|
|
|
**Default**: `false`
|
|
|
|
|
|
|
|
**Required**: false
|
|
|
|
|
|
|
|
**Description**: Whether to scroll the canvas when dragging the node, edge or combo
|
|
|
|
|
|
|
|
<embed src="../../common/BehaviorDirection.en.md"></embed>
|
|
|
|
|
|
|
|
<embed src="../../common/BehaviorEnableOptimize.en.md"></embed>
|
|
|
|
|
|
|
|
<embed src="../../common/BehaviorScalableRange.en.md"></embed>
|
|
|
|
|
|
|
|
## zoomKey
|
|
|
|
|
|
|
|
**Type**: `string` | `string[]`
|
|
|
|
|
|
|
|
**Default**: `ctrl`
|
|
|
|
|
|
|
|
**Required**: false
|
|
|
|
|
|
|
|
**Description**: The key to trigger zooming
|
|
|
|
|
|
|
|
## zoomRatio
|
|
|
|
|
|
|
|
**Type**: `number`
|
|
|
|
|
|
|
|
**Default**: `0.05`
|
|
|
|
|
|
|
|
**Required**: false
|
|
|
|
|
|
|
|
**Description**: The ratio of zooming
|