-
Notifications
You must be signed in to change notification settings - Fork 248
feat: ng-swipe-left/ng-swipe-right directives #1403
Conversation
Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement). CLA is important for us to be able to avoid legal troubles down the road. For individuals (a simple click-through form): http://code.google.com/legal/individual-cla-v1.0.html |
Achievement unlocked: CLA signature found! |
Function fn; | ||
|
||
// Subclasses decide on swipe direction whether to call fn or not. | ||
bool shouldFire(); |
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.
bool get shouldFire;
class NgSwipeRight extends _SwipeGesture { | ||
NgSwipeRight(dom.Element target): super(target); | ||
|
||
bool get shouldFire => xDirection == _SwipeGesture.RIGHT |
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.
minor, style:
bool get shouldFire => xDirection == _SwipeGesture.RIGHT &&
yDirection == _SwipeGesture.NO_SWIPE;
(operators must be at eol)
Thanks for the updates, could you please do the request updates (minor, style), squash your commits & force push. Thanks. |
LGTM |
Thanks for the contribution. I think This is a good idea, but we should have it as a separate library. Can you look at how animation lives in a separate folder and has a separate module, please model it same. |
The latest travis fail is due to some merge problem with pubspec.lock which I have not changed. There's nothing blocking this PR. |
8fd235c
to
50e2645
Compare
Support swipe gesture for touch enabled devices.
Support swipe gesture for touch enabled devices. Closes #1403
Support swipe gesture for touch enabled devices.