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

edge,combo,node层级 #5706

Open
theDoinb opened this issue May 7, 2024 · 1 comment
Open

edge,combo,node层级 #5706

theDoinb opened this issue May 7, 2024 · 1 comment

Comments

@theDoinb
Copy link

theDoinb commented May 7, 2024

问题描述

我想要edge在最底层,但如链接所示,groupByTypes: false时,对edge isBack似乎无效果。combo内的连线在node底下,而外边的又在上边,这个怎么弄?

重现链接

codesandbox

重现步骤

如上

预期行为

正常

平台

  • 操作系统: Windows
  • 网页浏览器: Google Chrome
  • G6 版本: 最新

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@theDoinb
Copy link
Author

theDoinb commented May 8, 2024

再问个 v5 animate怎么使用?用v4方法似乎无效

class CustomEdge extends LineEdge {

  afterDraw(model, shapeMap, diffData, diffState) {
        // get the first shape in the group, it is the edge's path here=
        const shape = shapeMap.keyShape;
   console.log(shape)
        let index = 0;
        // Define the animation
        shape.animate(
          () => {
            index++;
            if (index > 9) {
              index = 0;
            }
            console.log(index)
            const res = {
              keyShape: {
                 lineDash,
              lineDashOffset: -index,
               stroke: 'rgba(94,205,162,.7)',
          lineWidth: 3
              }
             
            };
            // returns the modified configurations here, lineDash and lineDashOffset here
            return res;
          },
          {
            repeat: true, // whether executes the animation repeatly
            duration: 3000, // the duration for executing once
          },
        );
      }
}

const Graph = extend(BaseGraph, {
  edges: {
    'custom-edge': CustomEdge,
  },
});

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

No branches or pull requests

1 participant