antvis / antvis/G6

After setting rotation, the direction of movement and zoom is incorrect

Open
#6,483 2 comments 0 reactions 0 assignees View on GitHub
behavior bug 🐛 v5
Dominant language
TypeScript
Stars
12.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug / 问题描述

const graph = new Graph({
rotation: 90,
......
})
rotation设置一个非0角度,例如90,出现了两个比较严重的问题
1. 拖拽方向不是鼠标的移动的方向
2. 放大缩小异常,首次自动放大缩小直接变成很小的一块,且放大缩小的中心不跟随鼠标
(我要实现整个图谱可以旋转的效果,尝试了在外层用css设置transform:rotate(90deg)是有问题的,图谱操作出现问题)

### Reproduction link / 重现链接

_No response_

### Steps to Reproduce the Bug or Issue / 重现步骤

_No response_

### G6 Version / G6 版本

🆕 5.x

### Operating System / 操作系统

Windows

### Browser / 浏览器

Chrome

### Additional context / 补充说明

在4.x的版本上也遇到了,不过4.x的版本旋转的问题相比5.x更加的不能理解,旋转90度直接图没了

Contributor guide

No contributing guide indexed for this repository

Research direction

Start from the Graph constructor's rotation option and reproduce the issue in G6 5.x on Windows with Chrome using rotation: 90. Trace the drag and zoom interaction entry points to determine why movement direction and zoom centering diverge from the pointer; done means dragging follows the mouse and zooming keeps the cursor as its center.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.