Open frankayars opened 11 years ago
Pinching will stop sending "pinching" events while the difference between fingers is within the range -10 and 10.
_capturePinch = function() { var diff, distance; distance = parseInt(_distance(CURRENT_TOUCH), 10); diff = GESTURE.initial_distance - distance; if (Math.abs(diff) > 10) { GESTURE.distance_difference = diff; return _trigger("pinching", { distance: diff }); } };
This logic is useful to initially determine a "pinching" threshold but causes issues when users pinches in/out (without lifting from the pinch gesture) and reaches the threshold.
Pinching will stop sending "pinching" events while the difference between fingers is within the range -10 and 10.
_capturePinch = function() { var diff, distance; distance = parseInt(_distance(CURRENT_TOUCH), 10); diff = GESTURE.initial_distance - distance; if (Math.abs(diff) > 10) { GESTURE.distance_difference = diff; return _trigger("pinching", { distance: diff }); } };
This logic is useful to initially determine a "pinching" threshold but causes issues when users pinches in/out (without lifting from the pinch gesture) and reaches the threshold.