()
| 59 | let lastLock = null |
| 60 | let $current = null |
| 61 | function open () { |
| 62 | if (lock === null) { |
| 63 | $current = $(this) |
| 64 | if (prevLock !== this && $current.hasClass ('toctree-l1')) { |
| 65 | lock = this |
| 66 | prevLock = lock |
| 67 | $links.removeClass ('current') |
| 68 | $current.removeClass ('hidden') |
| 69 | $current.addClass ('current', 400, 'linear', () => { |
| 70 | lock = null |
| 71 | if (last !== null && lastLock === null) { |
| 72 | lastLock = last |
| 73 | setTimeout (() => { |
| 74 | open.call (last) |
| 75 | lastLock = null |
| 76 | }, 400) |
| 77 | } |
| 78 | }) |
| 79 | // console.log ('setting height to ', heights[$current.children ().first ().attr ('href')]) |
| 80 | $current.parent ().css ('top', heights[$current.children ().first ().attr ('href')]) |
| 81 | } else { |
| 82 | $sublinks.removeClass ('current') |
| 83 | $links.not ($current.parent ().parent ()).removeClass ('current') |
| 84 | $current.addClass ('current') |
| 85 | } |
| 86 | } else { |
| 87 | last = this |
| 88 | } |
| 89 | } |
| 90 | // $links.on ('mouseover', open) |
| 91 | window.addEventListener ('scroll', () => { |
| 92 | const fromTop = window.scrollY + window.innerHeight * 0.5 |
searching dependent graphs…