(nodes, edges)
| 3247 | } |
| 3248 | |
| 3249 | function updateReportAnnotationToolbar() { |
| 3250 | const toolbar = document.querySelector(".annotation-toolbar"); |
| 3251 | const body = $("reportViewerBody"); |
| 3252 | const selection = window.getSelection(); |
| 3253 | if (!toolbar || !body || body.classList.contains("empty") || !selection || selection.rangeCount === 0 || selection.isCollapsed) { |
| 3254 | hideReportAnnotationToolbar(); |
| 3255 | return; |
| 3256 | } |
| 3257 | const range = selection.getRangeAt(0); |
| 3258 | if (!body.contains(range.commonAncestorContainer)) { |
| 3259 | hideReportAnnotationToolbar(); |
no test coverage detected