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

38 lines
718 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`
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`
The key to trigger zooming
## zoomRatio
**Type**: `number`
**Default**: `0.05`
The ratio of zooming