|
@ -51,12 +51,20 @@ const createFlowChart = (container: HTMLDivElement, miniMapContainer: HTMLDivEle |
|
|
snap: true, |
|
|
snap: true, |
|
|
dangling: true, |
|
|
dangling: true, |
|
|
highlight: true, |
|
|
highlight: true, |
|
|
|
|
|
anchor: 'center', |
|
|
|
|
|
connectionPoint: 'anchor', |
|
|
router: { |
|
|
router: { |
|
|
name: 'manhattan' |
|
|
name: 'manhattan' |
|
|
}, |
|
|
}, |
|
|
validateConnection({sourceView, targetView}) { |
|
|
validateConnection({sourceView, targetView, sourceMagnet, targetMagnet}) { |
|
|
|
|
|
if(!sourceMagnet) { |
|
|
|
|
|
return false; |
|
|
|
|
|
} else if(!targetMagnet) { |
|
|
|
|
|
return false; |
|
|
|
|
|
} else { |
|
|
return sourceView !== targetView; |
|
|
return sourceView !== targetView; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
// https://x6.antv.vision/zh/docs/tutorial/basic/background
|
|
|
// https://x6.antv.vision/zh/docs/tutorial/basic/background
|
|
|
background: { |
|
|
background: { |
|
|