-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
question 💬This issue is just a question. It will be converted into discussion automaticallyThis issue is just a question. It will be converted into discussion automatically
Description
Describe the bug / 问题描述
import { Graph } from '@antv/g6';
const graph = new Graph({
container: 'container',
layout: {
type: 'grid',
},
data: {
nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }],
edges: [
{ source: 'node1', target: 'node2' },
{ source: 'node1', target: 'node3' },
{ source: 'node1', target: 'node4' },
{ source: 'node2', target: 'node3' },
{ source: 'node3', target: 'node4' },
{ source: 'node4', target: 'node5' },
],
},
behaviors: ['drag-canvas','zoom-canvas'],
});
graph.render();
官网例子加一个;zoom-canvas 就可以了
Reproduction link / 复现链接
https://g6.antv.antgroup.com/examples/behavior/canvas/#drag
Steps to Reproduce the Bug or Issue / 重现步骤
进入页面滚轮缩放生效,拖拽过画布后,滚轮缩放就失效了
Version / 版本
🆕 5.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他
Metadata
Metadata
Assignees
Labels
question 💬This issue is just a question. It will be converted into discussion automaticallyThis issue is just a question. It will be converted into discussion automatically