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

addEdge不会触发edge:connected事件 #4034

Open
BaiyanAlwaysOnline opened this issue Nov 14, 2023 · 2 comments
Open

addEdge不会触发edge:connected事件 #4034

BaiyanAlwaysOnline opened this issue Nov 14, 2023 · 2 comments

Comments

@BaiyanAlwaysOnline
Copy link

功能描述

const edge = {
id: StringExt.uuid(),
shape: EDGE_TYPE,
source: {
cell: source,
port: sourcePortId
},
target: {
cell: target,
port: ${target}-in
},
zIndex: -1
}
if (graph) {
return graph.addEdge(edge)
}

  上面这个方法,无法触发edge:connected事件

期望解决方案

当有source和target的情况,触发edge:connected事件,或者能否有别的方案呢

@x6-bot
Copy link
Contributor

x6-bot bot commented Nov 14, 2023

👋 @BaiyanAlwaysOnline

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@cnyballk
Copy link
Contributor

可以手动触发一下graph.model.notify('edge:connected', { edge });

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

2 participants