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

[Bug]: When you add a layout in collapse-expand, it will jump when you open the node by double clicking. #6769

Open
2 of 10 tasks
RackweLLizm opened this issue Feb 12, 2025 · 1 comment
Labels
bug 🐛 Something isn't working

Comments

@RackweLLizm
Copy link

RackweLLizm commented Feb 12, 2025

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 / 其他
@RackweLLizm RackweLLizm added the waiting for maintainer Triage or intervention needed from a maintainer. label Feb 12, 2025
@zhongyunWan zhongyunWan removed the waiting for maintainer Triage or intervention needed from a maintainer. label Mar 5, 2025
@zhongyunWan
Copy link
Contributor

zhongyunWan commented Mar 5, 2025

补充一下效果图:

Image

@zhongyunWan zhongyunWan added the bug 🐛 Something isn't working label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants