I am making a X/Y control pad thingy where the user can drag an object around within a confined space. I use this module to provide the control pad with the bounds that constraints the objects. This works well when at the top of the page, but as soon as one scrolls, the top and/or left values fetched using getBoundingClientRect() will no longer be true.
I could solve this by composing <ControlDimensions> with another scroll detecting component, but I would first just like to check here if it would be within the scope of the module to support my scenario?
Hi there!
I am making a X/Y control pad thingy where the user can drag an object around within a confined space. I use this module to provide the control pad with the bounds that constraints the objects. This works well when at the top of the page, but as soon as one scrolls, the
top
and/orleft
values fetched usinggetBoundingClientRect()
will no longer be true.I could solve this by composing
<ControlDimensions>
with another scroll detecting component, but I would first just like to check here if it would be within the scope of the module to support my scenario?