EightMedia/hammer.js — pull request #103 by brandonhenricks (2012-11-28 13:47:12+00:00)
Title: Tap Event: Is Double Tap Fix

var is_double_tap = (function(){
if (_prev_tap_pos &&
options.tap_double &&
_prev_gesture == 'tap' &&
_pos.start &&
(_touch_start_time - _prev_tap_end_time) < options.tap_max_interval)
{
var x_distance = Math.abs(_prev_tap_pos[0].x - _pos.start[0].x);
var y_distance = Math.abs(_prev_tap_pos[0].y - _pos.start[0].y);
return (_prev_tap_pos && _pos.start && Math.max(x_distance, y_distance) < options.tap_double_distance);
}
return false;
})();