* Click handler for problems page * @param {MouseEvent} e
(e)
| 68 | * @param {MouseEvent} e |
| 69 | */ |
| 70 | function clickHandler(e) { |
| 71 | const $target = e.target.closest("[data-action='goto']"); |
| 72 | if (!$target) return; |
| 73 | const { action } = $target.dataset; |
| 74 | |
| 75 | if (action === "goto") { |
| 76 | const { fileId } = $target.dataset; |
| 77 | const annotation = $target.annotation; |
| 78 | if (!annotation) return; |
| 79 | const row = normalizeIndex(annotation.row); |
| 80 | const column = normalizeIndex(annotation.column); |
| 81 | |
| 82 | editorManager.switchFile(fileId); |
| 83 | editorManager.editor.gotoLine(row + 1, column); |
| 84 | $page.hide(); |
| 85 | |
| 86 | setTimeout(() => { |
| 87 | editorManager.editor.focus(); |
| 88 | }, 100); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | function collectAnnotations(file) { |
| 93 | const annotations = []; |
nothing calls this directly
no test coverage detected