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

Close on swipe up #71

Open
mhromov opened this issue Feb 7, 2020 · 3 comments
Open

Close on swipe up #71

mhromov opened this issue Feb 7, 2020 · 3 comments

Comments

@mhromov
Copy link

mhromov commented Feb 7, 2020

Hi! Is it possible to close stories on swipe up?
Thanks!

@mafioznick
Copy link

is it possible? swipe down/up to close?

@mafioznick
Copy link

Ramonszo, can you help, how can I use this maybe?
https://codepen.io/warrino/pen/yOybaB

@mafioznick
Copy link

i have try to add, but its not working, what can be wrong? any?

`var element = document.getElementById("stories");
var startY;
var endY;
var diffY;

element.addEventListener("touchstart", function(event) {
startY = event.touches[0].clientY;
});

element.addEventListener("touchend", function(event) {
endY = event.changedTouches[0].clientY;
diffY = startY - endY;

if (diffY > 100) {
stories.close();
}
});`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants