(elem: HTMLElement)
| 1 | import { Vec2 } from './vec2'; |
| 2 | |
| 3 | export function hasVertScrollbar(elem: HTMLElement) { |
| 4 | const computedStyle = window.getComputedStyle(elem); |
| 5 | |
| 6 | return ( |
| 7 | computedStyle.overflowY === 'scroll' || |
| 8 | (computedStyle.overflowY === 'auto' && |
| 9 | elem.scrollHeight > (elem.clientHeight || elem.offsetHeight)) |
| 10 | ); |
| 11 | } |
| 12 | export function hasHorizScrollbar(elem: HTMLElement) { |
| 13 | const computedStyle = window.getComputedStyle(elem); |
| 14 |
no outgoing calls
no test coverage detected