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
|
|
|
---
|
|
|
|
|
2023-11-13 13:41:40 +08:00
|
|
|
- [Scroll Canvas](/examples/interaction/moveCanvas/#scrollBoth)
|
|
|
|
- [Scroll Canvas alone Y-asix](/examples/interaction/moveCanvas/#scrollY)
|
|
|
|
|
2023-11-11 22:32:40 +08:00
|
|
|
## allowDragOnItem
|
|
|
|
|
2023-11-20 17:11:49 +08:00
|
|
|
**Type**: `boolean | {node?: boolean; edge?: boolean; combo?: boolean}`
|
2023-11-11 22:32:40 +08:00
|
|
|
|
|
|
|
**Default**: `false`
|
|
|
|
|
2023-11-20 17:11:49 +08:00
|
|
|
Whether to scroll the canvas when dragging the node, edge or combo
|
2023-11-11 22:32:40 +08:00
|
|
|
|
|
|
|
<embed src="../../common/BehaviorDirection.en.md"></embed>
|
|
|
|
|
|
|
|
<embed src="../../common/BehaviorEnableOptimize.en.md"></embed>
|
|
|
|
|
|
|
|
<embed src="../../common/BehaviorScalableRange.en.md"></embed>
|
|
|
|
|
|
|
|
## zoomKey
|
|
|
|
|
2023-11-20 17:11:49 +08:00
|
|
|
**Type**: `string | string[]`
|
2023-11-11 22:32:40 +08:00
|
|
|
|
|
|
|
**Default**: `ctrl`
|
|
|
|
|
2023-11-20 17:11:49 +08:00
|
|
|
The key to trigger zooming
|
2023-11-11 22:32:40 +08:00
|
|
|
|
|
|
|
## zoomRatio
|
|
|
|
|
|
|
|
**Type**: `number`
|
|
|
|
|
|
|
|
**Default**: `0.05`
|
|
|
|
|
2023-11-20 17:11:49 +08:00
|
|
|
The ratio of zooming
|