()
| 39 | } |
| 40 | |
| 41 | public resize(){ |
| 42 | const contentHeight = document.documentElement.scrollHeight; |
| 43 | const visibleHeight = window.innerHeight; |
| 44 | const thumbHeight = visibleHeight / contentHeight * visibleHeight; |
| 45 | this.thumb.style.setProperty('--height', thumbHeight + 'px'); |
| 46 | |
| 47 | if (contentHeight <= visibleHeight) { |
| 48 | this.scrollbar.classList.add('-hide') |
| 49 | } else { |
| 50 | this.scrollbar.classList.remove('-hide') |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | private updateThumb() { |
| 55 | const contentHeight = document.documentElement.scrollHeight; |
nothing calls this directly
no outgoing calls
no test coverage detected