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

Namespace window resize event, so it may be elegantly unbound #267

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

Conversation

bsheldon
Copy link

With pages that require high performance, sometimes with many high-resolution images being rendered concurrently, it's important to be able to debounce the internal update call/check.

Currently this can be achieved for scrolling (or other rapid-fire events) by passing a custom trigger method to the plugin's event setting, and any debouncing magic could be handled (with your utility lib of choice) prior to triggering said event.

However, window resize cannot currently be debounced, as is. It's not possible to unbind the resize event that is directly set on the window without actually clobbering any other resize events also attached (perhaps by other libs).

For a simple fix, we can namespace the plugin resize event to allow for easy unbinding where necessary. For example, any window resize debouncing magic could be handled prior to calling the custom event.

@tuupola tuupola self-assigned this Mar 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants