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

41 lines
697 B
Markdown
Raw Normal View History

---
title: ScrollCanvas
2023-11-12 13:52:11 +08:00
order: 12
---
## 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