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

使用selection 插件选择多个cell 之后滚轮进行缩放,选择框错位 #3452

Open
rexxara opened this issue Mar 31, 2023 · 2 comments
Labels
bug:selection selection plugin bug

Comments

@rexxara
Copy link

rexxara commented Mar 31, 2023

Describe the bug

使用selection 选择demo中的三个元素,鼠标滚轮进行缩放,发现橙色的选择框错位,不在节点上【ng】

Your Example Website or App

https://codesandbox.io/s/selection-zoom-error-vuhk9b?file=/src/App.tsx

Steps to Reproduce the Bug or Issue

运行demo
使用selection 选择demo中的三个元素,鼠标滚轮进行缩放,发现橙色的选择框错位,不在节点上【ng】

Expected behavior

期望缩放之后的选择框也在节点上,如果选择框能包含port就更好了

Screenshots or Videos

QQ截图20230331175858

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

@rexxara
Copy link
Author

rexxara commented Apr 13, 2023

我通过下面的代码修复了这个问题

    _graph.on('scale', (arg) => {
      const cells = _graph.getSelectedCells();
      _graph.cleanSelection();
      _graph.select(cells);
    })

@NewByVector NewByVector added the bug:selection selection plugin bug label Jul 6, 2023
@cyrilluce
Copy link
Contributor

#3918 已修复,可以关掉了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:selection selection plugin bug
Projects
None yet
Development

No branches or pull requests

3 participants