()
| 124 | |
| 125 | useLayoutEffect(() => { |
| 126 | function handleChange() { |
| 127 | let bcr = el ? el.getBoundingClientRect() : null; |
| 128 | setBcr(prev => (el && prev) ? assignImm(prev, { |
| 129 | x: includePosition ? bcr!.x : 0, |
| 130 | y: includePosition ? bcr!.y : 0, |
| 131 | width: bcr!.width, |
| 132 | height: bcr!.height, |
| 133 | }) : bcr); |
| 134 | } |
| 135 | |
| 136 | if (el) { |
| 137 | let observer = new ResizeObserver(handleChange); |
no test coverage detected