Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InteractiveGroup: Use getBoundingClientRect() when computing pointer. #24586

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

werto165
Copy link
Contributor

@werto165 werto165 commented Sep 2, 2022

When the renderer is placed in a child HTML element that is offset from the top left of the page the pointer locations returned on the click event listener are wrong and offset by the relative location of the renderer element on the page.

@Mugen87 Mugen87 changed the title Fixed issue with pointer location when placed within child HTML element, affecting pointer offset. InteractiveGroup: Use getBoundingClientRect() when computing pointer. Sep 2, 2022
@mrdoob mrdoob added this to the r145 milestone Sep 2, 2022
@mrdoob mrdoob merged commit ce32360 into mrdoob:dev Sep 2, 2022
@mrdoob
Copy link
Owner

mrdoob commented Sep 2, 2022

Thanks!

abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
…mrdoob#24586)

* Fixed issue with pointer location when placed within child HTML element, affecting pointer offset.

* Update InteractiveGroup.js

Co-authored-by: OllyJ918 <[email protected]>
Co-authored-by: Michael Herzog <[email protected]>
snagy pushed a commit to snagy/three.js-1 that referenced this pull request Sep 21, 2022
…mrdoob#24586)

* Fixed issue with pointer location when placed within child HTML element, affecting pointer offset.

* Update InteractiveGroup.js

Co-authored-by: OllyJ918 <[email protected]>
Co-authored-by: Michael Herzog <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants