(element: Dimensions, scrollContainers: Dimensions[])
| 20 | * @docs-private |
| 21 | */ |
| 22 | export function isElementScrolledOutsideView(element: Dimensions, scrollContainers: Dimensions[]) { |
| 23 | return scrollContainers.some(containerBounds => { |
| 24 | const outsideAbove = element.bottom < containerBounds.top; |
| 25 | const outsideBelow = element.top > containerBounds.bottom; |
| 26 | const outsideLeft = element.right < containerBounds.left; |
| 27 | const outsideRight = element.left > containerBounds.right; |
| 28 | |
| 29 | return outsideAbove || outsideBelow || outsideLeft || outsideRight; |
| 30 | }); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Gets whether an element is clipped by any of its scrolling containers. |
no outgoing calls
no test coverage detected