View Full Version : Swipe up and down

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

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.

29 Nov 2010, 11:57 PM

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?

3 Nov 2011, 12:52 AM
aehm - nope.

17 Dec 2011, 11:31 PM
Any more info on this one

18 Dec 2011, 9:27 PM
I found this

does work :)


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.