Updated the footable Lib.

This commit is contained in:
2016-03-19 03:51:35 +02:00
parent 1cad434a39
commit 3bc71a935c
801 changed files with 8543 additions and 3032 deletions

View File

@ -1,4 +1,4 @@
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
// Based on Zeptos touch.js
// https://raw.github.com/madrobby/zepto/master/src/touch.js
// Zepto.js may be freely distributed under the MIT license.
@ -19,7 +19,7 @@
function longTap() {
longTapTimeout = null;
if (touch.last) {
touch.el.trigger('longTap');
if ( touch.el !== undefined ) touch.el.trigger('longTap');
touch = {};
}
}
@ -55,7 +55,7 @@
var swipeDirectionFromVelocity = e.originalEvent.velocityX > 1 ? 'Right' : e.originalEvent.velocityX < -1 ? 'Left' : e.originalEvent.velocityY > 1 ? 'Down' : e.originalEvent.velocityY < -1 ? 'Up' : null;
if (swipeDirectionFromVelocity) {
if (swipeDirectionFromVelocity && touch.el !== undefined) {
touch.el.trigger('swipe');
touch.el.trigger('swipe'+ swipeDirectionFromVelocity);
}
@ -115,8 +115,10 @@
if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)){
swipeTimeout = setTimeout(function() {
touch.el.trigger('swipe');
touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2)));
if ( touch.el !== undefined ) {
touch.el.trigger('swipe');
touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2)));
}
touch = {};
}, 0);
@ -134,11 +136,11 @@
// (cancelTouch cancels processing of single vs double taps for faster 'tap' response)
var event = $.Event('tap');
event.cancelTouch = cancelAll;
touch.el.trigger(event);
if ( touch.el !== undefined ) touch.el.trigger(event);
// trigger double tap immediately
if (touch.isDoubleTap) {
touch.el.trigger('doubleTap');
if ( touch.el !== undefined ) touch.el.trigger('doubleTap');
touch = {};
}
@ -146,7 +148,7 @@
else {
touchTimeout = setTimeout(function(){
touchTimeout = null;
touch.el.trigger('singleTap');
if ( touch.el !== undefined ) touch.el.trigger('singleTap');
touch = {};
}, 250);
}