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 report]当连线时默认选中当前节点,但未触发selection:selected,node:click,blank:click,edge:click事件 #897

Open
zyh374892663 opened this issue Nov 21, 2022 · 1 comment
Labels
优化 New feature or request

Comments

@zyh374892663
Copy link

问题描述
请用简洁的语言描述你遇到的bug,至少包括以下部分,如提供截图请尽量完整:

  1. 问题触发的条件 当连线时,点击连接点时,节点被选中
  2. 期望的表现 触发'selection:selected,node:click,blank:click,edge:click'事件回调
  3. 实际的表现 没有任何响应

最简复现demo
一般来说通过文字和截图的描述我们很难定位到问题,为了帮助我们快速定位问题并修复,请按照以下指南编写并上传最简复现demo:
20221121175410

@zyh374892663
Copy link
Author

zyh374892663 commented Nov 22, 2022

暂时的解决方案如下:希望可以进行修复。

this.instance.on("anchor:dragstart", (data) => {
    const { id, type, x, y, properties } = data.nodeModel;
    this.instance.selectElementById(id);
    this.instance.graphModel.eventCenter.emit('node:click', {
        data: {
            id,
            type,
            x,
            y,
            properties
        }
    });
});

@towersxu towersxu added the 优化 New feature or request label Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
优化 New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants