(path, id)
| 143 | } |
| 144 | |
| 145 | export function scrollIntoView(path, id) { |
| 146 | if (!id) { |
| 147 | return; |
| 148 | } |
| 149 | const topMargin = config().topMargin; |
| 150 | const section = dom.find('#' + id); |
| 151 | section && scrollTo(section, topMargin); |
| 152 | |
| 153 | const li = nav[getNavKey(path, id)]; |
| 154 | const sidebar = dom.getNode('.sidebar'); |
| 155 | const active = dom.find(sidebar, 'li.active'); |
| 156 | active && active.classList.remove('active'); |
| 157 | li && li.classList.add('active'); |
| 158 | } |
| 159 | |
| 160 | const scrollEl = dom.$.scrollingElement || dom.$.documentElement; |
| 161 |
no test coverage detected
searching dependent graphs…