Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SmartGreenOrange opened this issue Nov 6, 2024 · 1 comment
Labels
behavior Issue about behaviors bug v5

Comments

@SmartGreenOrange
Copy link

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度直接图没了

@github-actions github-actions bot changed the title 设置rotation后,移动和缩放方向不正确 After setting rotation, the direction of movement and zoom is incorrect Nov 6, 2024
@Aarebecca
Copy link
Contributor

问题应该是拖拽和缩放交互没有考虑到画布旋转导致的

@yvonneyx yvonneyx added bug v5 behavior Issue about behaviors labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior Issue about behaviors bug v5
Projects
None yet
Development

No branches or pull requests

3 participants