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

Only bind event listeners on document when needed. #71

Merged
merged 1 commit into from Feb 13, 2013

Commits on Feb 12, 2013

  1. Only bind event listeners on document when needed.

    Bind mousemove and mouseup only when actually dragging.  Previously,
    these events were bound at initialization, and left in place even when
    no scroller was open.  This causes event overhead for any page that loads
    the script.  Instead, bind these listeners only when actually dragging.
    
    The "if(move)" checks in the event handlers can be removed, but to keep
    the patch small and readable I haven't done that.
    zewt committed Feb 12, 2013
    Copy the full SHA
    af70e04 View commit details
    Browse the repository at this point in the history