(rect: DOMRect, height: number)
| 140 | * @returns The reset DOMRect |
| 141 | */ |
| 142 | const resetElementRect = (rect: DOMRect, height: number) => { |
| 143 | const oldHeight = rect.height |
| 144 | if (oldHeight >= height) return rect |
| 145 | const top = rect.top + (oldHeight - height) / 2 |
| 146 | return new DOMRect(rect.left, top, rect.width, height) |
| 147 | } |
| 148 | |
| 149 | /** |
| 150 | * Check if a given DOMRect intersects with a given line defined by its top, bottom, and height values |
no outgoing calls
no test coverage detected
searching dependent graphs…