(elem)
| 513 | } |
| 514 | |
| 515 | function nodeId(elem) { |
| 516 | const id = elem.id; |
| 517 | if (!id) return -1; |
| 518 | if (!id.startsWith('node')) return -1; |
| 519 | const n = parseInt(id.slice(4), 10); |
| 520 | if (isNaN(n)) return -1; |
| 521 | if (n < 0 || n >= nodes.length) return -1; |
| 522 | return n; |
| 523 | } |
| 524 | |
| 525 | // Change highlighting of node (returns true if node was found). |
| 526 | function setNodeHighlight(n, set) { |
no outgoing calls
no test coverage detected
searching dependent graphs…