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

Added enable() and disable() methods for toggling ability to drag. #4

Merged
merged 1 commit into from Sep 3, 2015

Conversation

justindarc
Copy link
Contributor

No description provided.

this.timeout = setTimeout(() => this.dragging = false);

removeEventListener(pointer.move, this.onPointerMove);
removeEventListener(pointer.up, this.onPointerEnd);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Rather than duplicate the code, you could call onPointerEnd and not dispatch 'ended' if disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good call. I was trying to figure out an elegant way to do that.

@aosmond
Copy link

aosmond commented Sep 3, 2015

r+

@justindarc
Copy link
Contributor Author

Tests pass locally. Looks like an issue with Travis CI.

justindarc added a commit that referenced this pull request Sep 3, 2015
Added enable() and disable() methods for toggling ability to drag.
@justindarc justindarc merged commit 78fe8bc into fxos-components:master Sep 3, 2015
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.

None yet

2 participants