X6
X6 copied to clipboard
拖动多个选中节点时,在showshowNodeSelectionBox=false并且snapline=true时,出现节点随机漂移现象
Describe the bug
当框选多个节点后,假如Graph按照以下设置:
selecting: { enabled: true, multiple: true, rubberband: true, showNodeSelectionBox: false, }, snapline: true
那么在拖动节点的过程中(尤其是拖动的是边缘节点时),除当前被鼠标拖动的节点外,其他选中的节点会出现位置漂移现象。
如果showNodeSelectionBox=true或者snapling=false,则不会出现上述漂移现象。
Your Example Website or App
https://codesandbox.io/s/node-shifting-wig540
Steps to Reproduce the Bug or Issue
- 创建一个Graph对象,其中有两个选项必须如下设置: selecting: { enabled: true, multiple: true, rubberband: true, showNodeSelectionBox: false, }, snapline: true
- 框选多个节点,位置越散乱越好
- 拖动选中的节点,出当前被鼠标拖动的节点外,其他选中节点会出现漂移。
Expected behavior
选中节点正常移动,不出现随机漂移。
Screenshots or Videos
https://user-images.githubusercontent.com/14782/161272979-02ab4dd4-548c-45e2-a194-256def8fbf36.mp4
Platform
- OS: macOS Catalina 10.15.7
- Browser: Chrome
- Version: 99.0.4844.83
Additional context
No response
我有个类似的问题不知道算不算bug...
https://codesandbox.io/s/k3f7cp?file=/src/app.tsx:534-555 添加配置snapline: true 出现snapline后再框选,box也会漂移(Chrome web vitals显示为layoutshift).
Any update?