g6/packages/site/docs/apis/behaviors/ScrollCanvasOptions.en.md

44 lines
836 B
Markdown
Raw Normal View History

---
title: ScrollCanvas
2023-11-12 13:52:11 +08:00
order: 12
---
2023-11-13 13:41:40 +08:00
- [Scroll Canvas](/examples/interaction/moveCanvas/#scrollBoth)
- [Scroll Canvas alone Y-asix](/examples/interaction/moveCanvas/#scrollY)
## 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