(n,file,time=5000)
| 251 | onFlowClick(id,node._file) |
| 252 | } |
| 253 | function onFlowClick(n,file,time=5000){ |
| 254 | var node=gMermaid.FlowNode[n] |
| 255 | if(!node)return |
| 256 | var fileid=file.replace('.','_') |
| 257 | console.log(`flow click ${n} ${fileid} ${file}(${node.poi.line}:${node.poi.start})`,node) |
| 258 | document.getElementById('code_con').open=open; |
| 259 | var $detail=document.getElementById('detail_'+fileid) |
| 260 | $detail.open=true |
| 261 | var $line=document.querySelectorAll(`#detail_${fileid} .hljs-ln-line`) |
| 262 | for(let $l of $line){ |
| 263 | if($l.getAttribute('data-line-number')==node.poi.line){ |
| 264 | $l.style.backgroundColor = "#ff702e"; |
| 265 | $l.scrollIntoView({behavior:'smooth',block:'center',inline:'center'}) |
| 266 | document.getElementById('code_con').scrollBy(0,-100) |
| 267 | setTimeout(()=>{ |
| 268 | $l.style.backgroundColor = "#ffb02e"; |
| 269 | },3000) |
| 270 | break; |
| 271 | } |
| 272 | } |
| 273 | if(node._analysis)wtfmsg(`${gIconmap[node.type]}${node.value||node._value}:${node._analysis}`,time) |
| 274 | } |
| 275 | var gIconmap={ |
| 276 | "NewExpression":'🆕', |
| 277 | "CallExpression":'📞', |
no test coverage detected