GeoloeG / iron-swipeable-pages

[Polymer 1.x] Element that enables switching between different pages by swiping gesture.
MIT License
49 stars 25 forks source link

[Fixes 30] How to prevent Edge Swipe event? #31

Closed MeTaNoV closed 8 years ago

MeTaNoV commented 8 years ago

Fixes #30 by:


This change is Reviewable

MeTaNoV commented 8 years ago

@JohnsonChung : could you test this branch before I merge it to master and release a new version?

JohnsonChung commented 8 years ago

Thank you! MeTaNoV Really impressive efficient.

Now, will not Trigger the track by edge swipe, new problem, when you swipe start from SwipeAvailable area to edgeSwipeSensitivity area that will cause pages stuck.

JohnsonChung commented 8 years ago

I always use startPointX = e.detail.x - e.detail.dx; to check Down(track start) point to judge when should I return.

JohnsonChung commented 8 years ago

if ((track.x - track.dx) < this.edgeSwipeSensitivity || (track.x - track.dx) > this.offsetWidth - this.edgeSwipeSensitivity) { return } work perfectly so far.

MeTaNoV commented 8 years ago

oh yes, thanks for pointing this out @JohnsonChung ! I integrated your feedback, works as a charm now, Thanks!