-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Allow toggling with a swipe gesture, fixes #49 #85
Allow toggling with a swipe gesture, fixes #49 #85
Conversation
Something weird in Travis. Can you please try clearing all caches and restarting the build? |
Cleared and restarted |
Looks like we need to update the version of node for travis, probably to 6.x. See if changing that fixes this issue. |
fyi - blocked by html-next/ember-gestures#102 fyi |
@vvainio has brought my attention to the fact that my initial implementation does not support mouse gestures, only touch. This was probably due to the fact that I've changed This revealed a gotcha: when you pan with a mouse and release the mouse button over the toggle, a click even is produced on the @knownasilya I've bumped Node and it didn't help. Lets wait for html-next/ember-gestures#102 to finalize, it may resolve the issue. |
@lolmaus I'm currently using this in a project without jquery. Is there anyway we could handle this without having to use it? |
@webark Granted. |
🙏 |
ember-gestures fixed upstream, released as 0.4.7, fyi |
@eriktrom Thank you. 🙇 PR updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small changes, then we should be able to merge 👍
mouse button is released. | ||
*/ | ||
_disableLabelUntilMouseUp () { | ||
if (this.get('labelDisabled')) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make this a multi line if with { .. }
.
|
||
document.addEventListener('mouseup', () => { | ||
next(() => this.set('labelDisabled', false)); | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon
4f00bfa
to
a3b0ee2
Compare
@knownasilya I've addressed your comments and squashed. |
Published as 5.1.0 |
@knownasilya Thank you, comrade. |
Implemented toggling with a swipe gesture. Fixes #49.
Notes:
ember-gestures
needs an update ofember-hammertime
to support Ember 2.15+. PR pending. This PR currently uses a feature branch ofember-gestures
. You can try it out locally, but don't merge this yet.skewed
styles inverted for consistency with all other styles. This makes a difference because swiping is directional.skewed
active state: on Chrome Desktop with mouse clicking it didn't work, on Chrome Android with finger tapping/swiping the toggle stayed active (and misaligned) indefinitely, until user tapped elsewhere.