| 43 | }; |
| 44 | |
| 45 | const defaultScrollParentGetter = component => { |
| 46 | const { axis } = component.props; |
| 47 | let el = component.getEl(); |
| 48 | const overflowKey = OVERFLOW_KEYS[axis]; |
| 49 | while ((el = el.parentElement)) { |
| 50 | switch (window.getComputedStyle(el)[overflowKey]) { |
| 51 | case 'auto': |
| 52 | case 'scroll': |
| 53 | case 'overlay': |
| 54 | return el; |
| 55 | } |
| 56 | } |
| 57 | return window; |
| 58 | }; |
| 59 | |
| 60 | const defaultScrollParentViewportSizeGetter = component => { |
| 61 | const { axis } = component.props; |
nothing calls this directly
no test coverage detected
searching dependent graphs…