From 0e7bc4091ec7a870805f040e342732388db99560 Mon Sep 17 00:00:00 2001 From: Rory Hardy Date: Sun, 4 Aug 2013 20:27:47 -0500 Subject: [PATCH] Minor updates Changed invert to naturalSwipe Removed invert rule from index.html Ensured that left/right swipes only work with 1 hand present modified: index.html modified: plugin/leap/leap.js --- index.html | 3 --- plugin/leap/leap.js | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index decc2944..9ee09411 100644 --- a/index.html +++ b/index.html @@ -359,9 +359,6 @@ function linkify( selector ) { 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 diff --git a/plugin/leap/leap.js b/plugin/leap/leap.js index 27dc517a..ad2e3db7 100644 --- a/plugin/leap/leap.js +++ b/plugin/leap/leap.js @@ -25,7 +25,7 @@ var b=right.criteria;if(a!==b){if(a>b||a===void 0)return 1;if(ab||a===void 0)return 1;if(a 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(); } }