(rect: DOMRect)
| 31 | } |
| 32 | |
| 33 | function getPointsFromRect(rect: DOMRect) { |
| 34 | const { top, right, bottom, left } = rect |
| 35 | return [ |
| 36 | { x: left, y: top }, |
| 37 | { x: right, y: top }, |
| 38 | { x: right, y: bottom }, |
| 39 | { x: left, y: bottom }, |
| 40 | ] |
| 41 | } |
| 42 | |
| 43 | // Determine if a point is inside of a polygon. |
| 44 | // Based on https://github.com/substack/point-in-polygon |
no outgoing calls
no test coverage detected
searching dependent graphs…