MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / analysisNode

Function analysisNode

src/pages/Workspace/BluePrint.jsx:314–330  ·  view source on GitHub ↗
(saveNodeData)

Source from the content-addressed store, hash-verified

312 }
313
314 const analysisNode = (saveNodeData) => {
315 // 根据node数据获取用户需要表达的交互逻辑
316 // 以事件开始动作结束为一条连接关系
317 const result = []
318 let startNodeList = []
319 saveNodeData.edges.forEach(item => {
320 const startNode = getStartNodeByEdges(saveNodeData, item); // 起始node
321 startNode && startNodeList.push(startNode)
322
323 })
324 startNodeList = uniqueArray(startNodeList, 'id')
325 startNodeList.forEach(item => {
326 const singleResult = getChildrenProperty(saveNodeData, item) // 以当前起始node获取所有连接的下级
327 result.push(singleResult)
328 })
329 return result.flat(Infinity)
330 }
331 const handleCancel = () => {
332 props.closeBluePrint()
333 };

Callers 1

handleOkFunction · 0.85

Calls 3

getStartNodeByEdgesFunction · 0.85
getChildrenPropertyFunction · 0.85
uniqueArrayFunction · 0.70

Tested by

no test coverage detected