Move element bounds calculations out of container-block? #610
Unanswered
J4v4Scr1pt
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Hi, you'll have more chances that someone answers if you format your code using syntax highlighting and even more if you provide a sandbox. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Working sandbox: The other two draggbleButtons is ouside of the main page and you need to zoom out to see them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
This may be a really stupid question but Im calculating the
bounds
on a component I'm creating. This works as long as I dont place the component inside some div deeper down the page Html hierarchy. Then thebounds
is calculated based on it's closest containing block. But my component uses position: fixed, this should take it out of the document flow, and no other parent element has a breaking css (like transform, filter, etc.)Is there any way of telling useGesture to base it bounds calculation on the window/viewport rather than its closest parent container?
This is a big component will provide the necessary parts of it.
This image shows the parent containers and where the components calculations is based on:
If there is anything other I need to provide or I explained badly please let me know 😊!
Beta Was this translation helpful? Give feedback.
All reactions