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

Update Disable / Enable functions #148

Open
Gaffen opened this issue Nov 5, 2019 · 2 comments
Open

Update Disable / Enable functions #148

Gaffen opened this issue Nov 5, 2019 · 2 comments
Assignees

Comments

@Gaffen
Copy link

Gaffen commented Nov 5, 2019

I have a use case where I'd like to disable and re-enable PanelSnap. As it stands the (undocumented) enable/disable functions work for this, however the library will continue to log to console as the events are still attached to the scroll container.

Would it be possible to add removing/re-adding the relevant events to the disable and enable methods?

@guidobouman guidobouman self-assigned this Nov 6, 2019
@guidobouman
Copy link
Owner

guidobouman commented Nov 6, 2019

That's a good idea. Aside from the logging to the console, does the plugin do anything else you don't want it to? I'm wondering how this would work and what the actual use would be.

You are of course welcome to submit a PR. Otherwise I'll look into this when I have time.

@Gaffen
Copy link
Author

Gaffen commented Nov 7, 2019

@guidobouman No, the plugin is fully functional for my use case as it is; so this is purely an enhancement.

The use case in question is that I have elements below the PanelSnap instance, which I want to be able to scroll to. I'm using an intersection observer to toggle the enabled/disabled status of PanelSnap as a result.

I will look into submitting a pull request when I get a moment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants