fixed two minor bugs, a twohanded gesture may not have a direction, and if autoCenter is of, the tipPosition was in the wrong scope

This commit is contained in:
Gijs Koot 2014-03-05 15:20:30 +01:00
parent 714102c3f8
commit 71f1780b50
1 changed files with 4 additions and 2 deletions

View File

@ -76,9 +76,11 @@ var b=right.criteria;if(a!==b){if(a>b||a===void 0)return 1;if(a<b||b===void 0)re
pointer.style.borderRadius = size - 5 + 'px'; pointer.style.borderRadius = size - 5 + 'px';
pointer.style.visibility = 'visible'; pointer.style.visibility = 'visible';
if( config.autoCenter ) {
tipPosition = frame.fingers[0].tipPosition; tipPosition = frame.fingers[0].tipPosition;
if( config.autoCenter ) {
// Check whether the finger has entered the z range of the Leap Motion. Used for the autoCenter option. // Check whether the finger has entered the z range of the Leap Motion. Used for the autoCenter option.
if( !entered ) { if( !entered ) {
entered = true; entered = true;
@ -144,7 +146,7 @@ var b=right.criteria;if(a!==b){if(a>b||a===void 0)return 1;if(a<b||b===void 0)re
// Two hand gestures // Two hand gestures
else if( frame.hands.length === 2 ) { else if( frame.hands.length === 2 ) {
// Upward two hand swipe gesture // Upward two hand swipe gesture
if( gesture.direction[1] > 0 && gesture.type === 'swipe' ) { if( gesture.type === 'swipe' && gesture.direction[1] > 0 ) {
Reveal.toggleOverview(); Reveal.toggleOverview();
} }