View Full Version : Swipe up and down
Phil_B
29 Nov 2010, 8:24 AM
Hello @all
first of all, sorry for my bad english.
I am new with the Sencha framework and i have a question about swipe events.
Is it possible to detect a swipe event in 'up' or 'down' direction?
Best regards
Phil_B
Bunchofstring
29 Nov 2010, 11:55 AM
Welcome Phil. I am just getting started with it too, but it has been a fun learning process so far. Are you trying to scroll some content vertically, or do you want to create a custom behavior for those gestures? If you are trying to scroll something, you can add scroll:'vertical' like it says here: http://dev.sencha.com/deploy/touch/docs/?class=Ext.lib.Panel
If you are trying to do some fancy custom behaviors, an experienced user/developer will have to chime in because I've got no idea.
Phil_B
29 Nov 2010, 11:57 PM
Hello
No, i don´t want to scroll some content. I started to create a webapp in which a user can navigate without use of buttons/lists.
Users should navigate via tabbar to different parts of the app. In each part the user can navigate via the swipe events "up" (go to next page 'vertical'), "down" (go to last page 'vertical'), "left" and "right" (go to next/last page 'horizontal').
I´ve tried it with my own solution for swipe-detecting but i think it was not the best solution for this problem.
VinylFox told me that i can try this code to detect swipe in "up" direction:
blah.on('swipe', function(ev) {
if (ev.direction == "up") {
//do something
}
});
But in the souce-code of sencha (swipe.js) i can´t find any advice to this solution. :-/
Does it work?
headkit
3 Nov 2011, 12:52 AM
aehm - nope.
Excell
17 Dec 2011, 11:31 PM
Any more info on this one
Excell
18 Dec 2011, 9:27 PM
I found this
does work :)
http://www.chrisrossi.com/2011/03/16/how-to-add-updown-swipe-functionality-to-sencha-touch/
clarkke8
4 Jan 2012, 8:40 AM
It sounds like what you're describing is a Carousel, which is a built-in component that will handle the swipe detection and navigation for you.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.