(path: string)
| 1163 | } |
| 1164 | |
| 1165 | const reviewDiffTop = (path: string) => { |
| 1166 | const root = tree.reviewScroll |
| 1167 | if (!root) return |
| 1168 | |
| 1169 | const id = reviewDiffId(path) |
| 1170 | if (!id) return |
| 1171 | |
| 1172 | const el = document.getElementById(id) |
| 1173 | if (!(el instanceof HTMLElement)) return |
| 1174 | if (!root.contains(el)) return |
| 1175 | |
| 1176 | const a = el.getBoundingClientRect() |
| 1177 | const b = root.getBoundingClientRect() |
| 1178 | return a.top - b.top + root.scrollTop |
| 1179 | } |
| 1180 | |
| 1181 | const scrollToReviewDiff = (path: string) => { |
| 1182 | const root = tree.reviewScroll |
no test coverage detected