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

TrackBallControls: allow mouse control to be null #463

Closed
AyaHelmy9 opened this issue May 15, 2023 · 0 comments · Fixed by #604
Closed

TrackBallControls: allow mouse control to be null #463

AyaHelmy9 opened this issue May 15, 2023 · 0 comments · Fixed by #604
Labels
enhancement New feature or request

Comments

@AyaHelmy9
Copy link

When using TypeScript the mouse control is not allowed to be nullable when in fact I wish to not have any control for a particular mouse button.
Currently I have to do this to make it work:

mouseButtons={{
          LEFT: three.MOUSE.RIGHT, // map left behaviour (rotate) to right mouse click
          MIDDLE: null as unknown as three.MOUSE, // map middle behaviour (zoom) to nothing
          RIGHT: three.MOUSE.MIDDLE, // map right behaviour (pan) to middle mouse click
        }}

Note that this is similar to #144 but this time for TrackBallControls.

@AyaHelmy9 AyaHelmy9 added the enhancement New feature or request label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant