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

Function getStartNodeByEdges

src/pages/Workspace/BluePrint.jsx:188–197  ·  view source on GitHub ↗
(saveNodeData, edge)

Source from the content-addressed store, hash-verified

186 return result.filter(v => { return v })
187 }
188 const getStartNodeByEdges = (saveNodeData, edge) => {
189 // 根据edge获取当前线条的起点(事件开始)
190 const { sourceAnchor, source } = edge
191 const sourceNode = findNodeById(saveNodeData.nodes, source)
192 if ((sourceNode.type === 'element' || sourceNode.type === 'interActive') && (sourceNode.componentsType === 'pagination' ? (sourceAnchor === 0 || sourceAnchor === 1) : sourceAnchor === 0)) {
193 // 起点是事件
194 return sourceNode
195 }
196
197 }
198 const targetNodeIsEnd = (node) => {
199 // edge的 target是否为结尾(为element)
200 if (node.type === 'element') {

Callers 1

analysisNodeFunction · 0.85

Calls 1

findNodeByIdFunction · 0.85

Tested by

no test coverage detected