author | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2013-04-21 15:53:34 (UTC) |
---|---|---|
committer | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2013-04-21 15:53:34 (UTC) |
commit | 0608e045f6aa471916829468f48082ea07a453f4 (patch) (unidiff) | |
tree | 57748b9a76e592ae35b165cd6a203e12493d4044 /frontend/gamma/js/Zepto/gesture.js | |
parent | 074e70457c90344b3c1cb236105638d692a0066b (diff) | |
download | clipperz-0608e045f6aa471916829468f48082ea07a453f4.zip clipperz-0608e045f6aa471916829468f48082ea07a453f4.tar.gz clipperz-0608e045f6aa471916829468f48082ea07a453f4.tar.bz2 |
Removed extra JS libraries no longer used for the mobile version
Diffstat (limited to 'frontend/gamma/js/Zepto/gesture.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Zepto/gesture.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/frontend/gamma/js/Zepto/gesture.js b/frontend/gamma/js/Zepto/gesture.js deleted file mode 100644 index 035455b..0000000 --- a/frontend/gamma/js/Zepto/gesture.js +++ b/dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | // Zepto.js | ||
2 | // (c) 2010-2012 Thomas Fuchs | ||
3 | // Zepto.js may be freely distributed under the MIT license. | ||
4 | |||
5 | ;(function($){ | ||
6 | if ($.os.ios) { | ||
7 | var gesture = {}, gestureTimeout | ||
8 | |||
9 | function parentIfText(node){ | ||
10 | return 'tagName' in node ? node : node.parentNode | ||
11 | } | ||
12 | |||
13 | $(document).bind('gesturestart', function(e){ | ||
14 | var now = Date.now(), delta = now - (gesture.last || now) | ||
15 | gesture.target = parentIfText(e.target) | ||
16 | gestureTimeout && clearTimeout(gestureTimeout) | ||
17 | gesture.e1 = e.scale | ||
18 | gesture.last = now | ||
19 | }).bind('gesturechange', function(e){ | ||
20 | gesture.e2 = e.scale | ||
21 | }).bind('gestureend', function(e){ | ||
22 | if (gesture.e2 > 0) { | ||
23 | Math.abs(gesture.e1 - gesture.e2) != 0 && $(gesture.target).trigger('pinch') && | ||
24 | $(gesture.target).trigger('pinch' + (gesture.e1 - gesture.e2 > 0 ? 'In' : 'Out')) | ||
25 | gesture.e1 = gesture.e2 = gesture.last = 0 | ||
26 | } else if ('last' in gesture) { | ||
27 | gesture = {} | ||
28 | } | ||
29 | }) | ||
30 | |||
31 | ;['pinch', 'pinchIn', 'pinchOut'].forEach(function(m){ | ||
32 | $.fn[m] = function(callback){ return this.bind(m, callback) } | ||
33 | }) | ||
34 | } | ||
35 | })(Zepto) | ||