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?

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 / 其他

č”„å……äø€äø‹ę•ˆęžœå›¾ļ¼š

Image

posted by zhongyunWan about 2 months ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests