antvis/G6

Do you want to work on this issue?

You can request for a bounty in order to promote it!

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

SmartGreenOrange posted onGitHub

Describe the bug / 问题描述

const graph = new Graph({ rotation: 90, ...... }) rotation设置一个非0角度,例如90,出现了两个比较严重的问题

  1. 拖拽方向不是鼠标的移动的方向
  2. 放大缩小异常,首次自动放大缩小直接变成很小的一块,且放大缩小的中心不跟随鼠标 (我要实现整个图谱可以旋转的效果,尝试了在外层用css设置transform:rotate(90deg)是有问题的,图谱操作出现问题)

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


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

posted by Aarebecca 6 months ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests