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

Let Pan accept multiple mouse buttons #1149

Merged
merged 1 commit into from
Jul 1, 2022
Merged

Let Pan accept multiple mouse buttons #1149

merged 1 commit into from
Jul 1, 2022

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Jun 30, 2022

Fix #1143

<Pan button={[MouseButton.Left, MouseButton.Middle]} />

With the above, panning is allowed with either the left or the middle button. Obviously, contrary to the modifierKey prop, the logic here is "OR", not "AND".

I've documented the new behaviour in the Storybook and took the opportunity to add a story to demonstrate setting multiple modifier keys.

@axelboc axelboc force-pushed the multiple-buttons branch from 29671af to e2a1b53 Compare June 30, 2022 08:09
apps/storybook/src/Pan.stories.tsx Show resolved Hide resolved
apps/storybook/src/Pan.stories.tsx Show resolved Hide resolved
apps/storybook/src/Pan.stories.tsx Show resolved Hide resolved
apps/storybook/src/Pan.stories.tsx Show resolved Hide resolved
apps/storybook/src/Pan.stories.tsx Show resolved Hide resolved
apps/storybook/src/Pan.stories.tsx Show resolved Hide resolved
apps/storybook/src/Pan.stories.tsx Show resolved Hide resolved
packages/lib/src/index.ts Show resolved Hide resolved
apps/storybook/src/Pan.stories.tsx Show resolved Hide resolved
apps/storybook/src/Pan.stories.tsx Show resolved Hide resolved
@axelboc axelboc force-pushed the strict-interactions branch from 3d56359 to 0b5ad5c Compare July 1, 2022 08:50
Base automatically changed from strict-interactions to main July 1, 2022 08:55
@axelboc axelboc force-pushed the multiple-buttons branch from e2a1b53 to 1751e3e Compare July 1, 2022 08:59
@axelboc axelboc merged commit 18713b8 into main Jul 1, 2022
@axelboc axelboc deleted the multiple-buttons branch July 1, 2022 09:05
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.

[Pan] Support panning with both left and middle mouse buttons
2 participants