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

Add wheelPropagationDisabledIfScrollable option #145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SvenSchoene
Copy link

@SvenSchoene SvenSchoene commented Sep 9, 2022

  • Read CONTRIBUTING.md
  • Run npm test to make sure it formats and build successfully
  • Provide the scenario this PR will address(some JSFiddles will be perfect)
    • I describe the use-case for this below.
  • Refer to concerning issues if exist
    • No existing issues regarding this found.

We have a specific use case regarding wheel propagation: When there is a container with a scroll bar, we want wheelPropagation: false. However, when the container does not have a scroll bar, we want wheelPropagation: true.

This was not really possible to implement outside of this library.

I added three new examples for this.

Example code:

const ps = new PerfectScrollbar(demo, {
  wheelPropagationDisabledIfScrollable: true,
});

I read the contributions guide; ran the formatter; re-built the source files so that /dist is updated; updated the typescript file; and added an example.

@SvenSchoene SvenSchoene force-pushed the add-option-to-disable-wheel-propagation-if-scrollable branch from 775c834 to 3d7b6c7 Compare September 9, 2022 05:38
@SvenSchoene SvenSchoene force-pushed the add-option-to-disable-wheel-propagation-if-scrollable branch from 3d7b6c7 to 894785c Compare September 9, 2022 05:39
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.

1 participant