aboutsummaryrefslogtreecommitdiff
path: root/plugin/leap
diff options
context:
space:
mode:
authorRory Hardy <rory.cronin-hardy@cerner.com>2013-08-04 20:27:47 -0500
committerRory Hardy <rory.cronin-hardy@cerner.com>2013-08-04 20:27:47 -0500
commit0e7bc4091ec7a870805f040e342732388db99560 (patch)
treea32c68ded97ad05676dea42aa3a2573576542b03 /plugin/leap
parent70cade3732200f769f0d6c930c7dd14a94da7be2 (diff)
downloadperl-software-in-gnu-guix-0e7bc4091ec7a870805f040e342732388db99560.tar
perl-software-in-gnu-guix-0e7bc4091ec7a870805f040e342732388db99560.tar.gz
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
Diffstat (limited to 'plugin/leap')
-rw-r--r--plugin/leap/leap.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugin/leap/leap.js b/plugin/leap/leap.js
index 27dc517..ad2e3db 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(a<b||b===void 0)re
lastGesture = 0,
config = Reveal.getConfig().leap ||
{
- invert: false
+ naturalSwipe: true
},
now;
@@ -43,20 +43,20 @@ var b=right.criteria;if(a!==b){if(a>b||a===void 0)return 1;if(a<b||b===void 0)re
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();
}
}