-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
How to detect scrolling on CameraControls #436
Comments
Unfortunately, CC will block scroll currently... CC prevents wheel events, then scroll events will be blocked as a side effect. camera-controls/src/CameraControls.ts Lines 840 to 866 in cee0427
Maybe we could add a new option like |
@yomotsu Is zooming with touch events done differently than scrolling the page with touch events? Just thinking... on desktop you zoom with the mouse wheel AND page scroll with the mouse wheel. But if on mobile zooming is done with two fingers and scrolling is performed with a different action, we might not need to include touch events for this new feature. Some naming options...
just a few ideas |
@IDrumsey on mobile the scrolling is prevented by the camera orbit event, would be great if CC let the page scroll when the orbit reached its limit! @yomotsu what do you think of an option like |
@esnho, yeah. I forgot about orbiting constraints. Would make sense to start auto scrolling when the limits were reached. Not familiar with the codebase, but maybe something like |
Thank you, guys, for your suggestions. It may take time, but I will add features when I have time.
Yeah...actually I have no idea for detecting orbit limit...but oneday. |
Hi, Will this be released anytime soon ? |
As stated here
Is there any way to detect the scroll event on the CameraControls? I've tried putting the event listener 'scroll' on the Canvas and a on a wrapper div around the Canvas. Nothing gets fired. My use case is when the user has scrolled to the minDistance or maxDistance, the zooming will stop and the mouse wheel will start to regularly scroll that page.
The text was updated successfully, but these errors were encountered: