progress: true,
history: true,
center: true,
- leap: {
- invert : true
- },
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
lastGesture = 0,
config = Reveal.getConfig().leap ||
{
- invert: false
+ naturalSwipe: true
},
now;
if ( gesture.speed > 1000 && gesture.state === 'start' && gesture.type === 'swipe' ) {
- if( frame.fingers.length > 1 ) {
+ if( frame.hands.length === 1 && frame.fingers.length > 1 ) {
if ( Math.abs(x) > Math.abs(y) ) {
if ( x > 0 ) {
- config.invert ? Reveal.left() : Reveal.right();
+ config.naturalSwipe ? Reveal.left() : Reveal.right();
} else {
- config.invert ? Reveal.right() : Reveal.left();
+ config.naturalSwipe ? Reveal.right() : Reveal.left();
}
lastGesture = now;
} else {
if ( y > 0 ) {
- config.invert ? Reveal.down() : Reveal.up();
+ config.naturalSwipe ? Reveal.down() : Reveal.up();
} else {
- config.invert ? Reveal.up() : Reveal.down();
+ config.naturalSwipe ? Reveal.up() : Reveal.down();
}
}