antvis/G6

Do you want to work on this issue?
You can request for a bounty in order to promote it!
[Bug]: When you add a layout in collapse-expand, it will jump when you open the node by double clicking. #6769
RackweLLizm posted onGitHub
Describe the bug / é®é¢ęčæ°
import { Graph } from '@antv/g6';
const graph = new Graph({
container: 'container',
layout: {
type: 'circular',
},
data: {
nodes: [
{ id: 'node1', combo: 'combo1' },
{ id: 'node2', combo: 'combo1' },
{ id: 'node3'},
{ id: 'node4', combo: 'combo1', },
],
edges: [
{ source: 'node1', target: 'node2' },
{ source: 'node1', target: 'node3' },
{ source: 'node4', target: 'node1' },
],
combos: [{ id: 'combo1',style: { x: 350, y: 300,collapsed: true, } }],
},
behaviors: ['collapse-expand', 'drag-element'],
});
graph.render();
The above example is taken from the following site: https://g6.antv.antgroup.com/en/examples/behavior/combo#basic
After adding layout, drag the collapsed node or try to expand it by double-clicking. It will suddenly jump to the top. How can I prevent this behavior?
Reproduction link / å¤ē°é¾ę„
No response
Steps to Reproduce the Bug or Issue / éē°ę„éŖ¤
Version / ēę¬
š 5.x
OS / ęä½ē³»ē»
- macOS
- Windows
- Linux
- Others / å ¶ä»
Browser / ęµč§åØ
- Chrome
- Edge
- Firefox
- Safari (Limited support / ęéęÆę)
- IE (Nonsupport / äøęÆę)
- Others / å ¶ä»