vendor/reveal.js/plugin/leap/leap.js in slide_hero-0.0.8 vs vendor/reveal.js/plugin/leap/leap.js in slide_hero-0.0.9
- old
+ new
@@ -74,12 +74,14 @@
pointer.style.width = size + 'px';
pointer.style.height = size + 'px';
pointer.style.borderRadius = size - 5 + 'px';
pointer.style.visibility = 'visible';
+ tipPosition = frame.fingers[0].tipPosition;
+
if( config.autoCenter ) {
- tipPosition = frame.fingers[0].tipPosition;
+
// Check whether the finger has entered the z range of the Leap Motion. Used for the autoCenter option.
if( !entered ) {
entered = true;
enteredPosition = frame.fingers[0].tipPosition;
@@ -142,10 +144,10 @@
}
}
// Two hand gestures
else if( frame.hands.length === 2 ) {
// Upward two hand swipe gesture
- if( gesture.direction[1] > 0 && gesture.type === 'swipe' ) {
+ if( gesture.type === 'swipe' && gesture.direction[1] > 0 ) {
Reveal.toggleOverview();
}
lastGesture = now;
}