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