gouz/moodular — Issue #4: A fix for Touch controls
Author: jacobdubail
Created: 2011-11-05 19:07:50+00:00
State: open

Hey,

Are you still actively developing this plugin? I need a carousel that works well with touch and desktop.

I noticed that if I have more than 1 slide visible at a time and my controls are set to "touch", the carousel jumps multiple slides each time.

Instead, couldn't we tweak the controls extension with something like this:

if (moodular.opts.direction == 'left') {
if (moodular.touchEPosX < moodular.touchBPosX)
moodular.moveTo(moodular.current + 1);
else
moodular.moveTo(moodular.current - 1);
}
else {
if (moodular.touchEPosX > moodular.touchBPosX)
moodular.moveTo(moodular.current +1);
else
moodular.moveTo(moodular.current - 1);
}

I just tested on my Android device and it seems to work pretty well.

-J