We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题描述 做一个审批流,希望开始节点只能连接一个其他节点,但是以下代码不符合期望
最简复现demo
lf.register('START', ({ CircleNode, CircleNodeModel }) => { class StartNodeModel extends CircleNodeModel { // 开始 0个连入 1个连出 setAttributes() { this.targetRules.push({ message: '开始节点只能连出', validate: (source, target) => { return false; }, }); this.sourceRules.push({ message: '开始节点只能连出一条分支', validate: (source, target) => { console.log('触发source', source, target); const arr = lf.getEdge({ sourceNodeId: source.id, }); if (arr.length === 0) { return true; } else { return false; } }, }); } } return { view: CircleNode, model: StartNodeModel, }; });
bug复现操作 第一次连接处于选中状态的时候,可以对同一个节点连接多次,没有触发sourceRules里面的规则,后续取消选中状态后恢复正常
bug样式
The text was updated successfully, but these errors were encountered:
问题已修复,请测试最新版本。
Sorry, something went wrong.
No branches or pull requests
问题描述
做一个审批流,希望开始节点只能连接一个其他节点,但是以下代码不符合期望
最简复现demo
bug复现操作
第一次连接处于选中状态的时候,可以对同一个节点连接多次,没有触发sourceRules里面的规则,后续取消选中状态后恢复正常
bug样式
The text was updated successfully, but these errors were encountered: