mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
feat: 工作流
This commit is contained in:
parent
7058321678
commit
2ceddb5c40
|
|
@ -110,12 +110,20 @@ class AppNodeModel extends HtmlResize.model {
|
|||
}
|
||||
setAttributes() {
|
||||
this.width = this.properties?.width || 340
|
||||
|
||||
const circleOnlyAsTarget = {
|
||||
message: '只允许从右边的锚点连出',
|
||||
validate: (sourceNode: any, targetNode: any, sourceAnchor: any) => {
|
||||
return sourceAnchor.type === 'right'
|
||||
}
|
||||
}
|
||||
|
||||
this.sourceRules.push({
|
||||
message: '只允许连一个节点',
|
||||
validate: (sourceNode: any, targetNode: any, sourceAnchor: any) => {
|
||||
return !this.graphModel.edges.some((item) => item.sourceNodeId === sourceNode.id)
|
||||
}
|
||||
})
|
||||
this.sourceRules.push(circleOnlyAsTarget)
|
||||
this.targetRules.push({
|
||||
message: '只允许连接左边的锚点',
|
||||
|
|
|
|||
Loading…
Reference in New Issue