fix: 【工作流】修复结束锚点不能连接到已被链接的锚点(#686)
This commit is contained in:
parent
00f2a8bbd4
commit
ff9c613602
@ -195,10 +195,14 @@ class AppNodeModel extends HtmlResize.model {
|
|||||||
|
|
||||||
this.sourceRules.push({
|
this.sourceRules.push({
|
||||||
message: '只允许连一个节点',
|
message: '只允许连一个节点',
|
||||||
validate: (sourceNode: any, targetNode: any, sourceAnchor: any) => {
|
validate: (sourceNode: any, targetNode: any, sourceAnchor: any, targetAnchor: any) => {
|
||||||
return !this.graphModel.edges.some((item) => item.sourceAnchorId === sourceAnchor.id)
|
return !this.graphModel.edges.some(
|
||||||
|
(item) =>
|
||||||
|
item.sourceAnchorId === sourceAnchor.id || item.targetAnchorId === targetAnchor.id
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.sourceRules.push(circleOnlyAsTarget)
|
this.sourceRules.push(circleOnlyAsTarget)
|
||||||
this.targetRules.push({
|
this.targetRules.push({
|
||||||
message: '只允许连接左边的锚点',
|
message: '只允许连接左边的锚点',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user