You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just wondering if there were any plans to expose the element's x, y, top, left, etc. coordinates since you are already accessing dimensions from contentRect?
The text was updated successfully, but these errors were encountered:
Currently onResize reports width and height, and it reports the requested kind of dimensions (content- or border box size), using borderBoxSize, contentBoxSize, or the old contentRect prop.
Only contentRect has properties other than width / height, and it seems a bit accidental if I'm honest from an early implementation, as outlined in the MDN docs.
I would rather consider a lower-level implementation to hook onto, something like onEntry reporting the entire entry object itself as an escape hatch, allowing to implement something like this. 🤔
So basically I would keep the current useResizeObserver as-is, to preserve its size observing API and optimisations, and could just add another lower-level hook called something like useResizeObserverEntry, with an onChange method 🤔
Thank you for the great library!!
Just wondering if there were any plans to expose the element's
x
,y
,top
,left
, etc. coordinates since you are already accessing dimensions from contentRect?The text was updated successfully, but these errors were encountered: