From db225848ebfc8011458526df9e3999e02ef77e21 Mon Sep 17 00:00:00 2001 From: Titouan Date: Tue, 31 Jan 2017 15:08:28 +0100 Subject: [PATCH 1/3] Adjust vertical drag sensibility --- dist/flickity.pkgd.js | 7 ++++++- dist/flickity.pkgd.min.js | 4 ++-- js/drag.js | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dist/flickity.pkgd.js b/dist/flickity.pkgd.js index f069570d..6f262293 100644 --- a/dist/flickity.pkgd.js +++ b/dist/flickity.pkgd.js @@ -1998,6 +1998,11 @@ if ( jQuery && jQuery.bridget ) { jQuery.bridget( 'flickity', Flickity ); } +// set internal jQuery, for Webpack + jQuery v3, #478 +Flickity.setJQuery = function( jq ) { + jQuery = jq; +}; + Flickity.Cell = Cell; return Flickity; @@ -2776,7 +2781,7 @@ proto.canPreventDefaultOnPointerDown = function( event ) { // ----- move ----- // proto.hasDragStarted = function( moveVector ) { - return Math.abs( moveVector.x ) > this.options.dragThreshold; + return Math.abs( moveVector.x ) > this.options.dragThreshold && Math.abs( moveVector.y ) < 3; }; // ----- up ----- // diff --git a/dist/flickity.pkgd.min.js b/dist/flickity.pkgd.min.js index 5f771391..5dc817bf 100644 --- a/dist/flickity.pkgd.min.js +++ b/dist/flickity.pkgd.min.js @@ -9,5 +9,5 @@ * Copyright 2016 Metafizzy */ -!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,o,a){function l(t,e,n){var s,o="$()."+i+'("'+e+'")';return t.each(function(t,l){var h=a.data(l,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+o);var c=h[e];if(!c||"_"==e.charAt(0))return void r(o+" is not a valid method");var d=c.apply(h,n);s=void 0===s?d:s}),void 0!==s?s:t}function h(t,e){t.each(function(t,n){var s=a.data(n,i);s?(s.option(e),s._init()):(s=new o(n,e),a.data(n,i,s))})}a=a||e||t.jQuery,a&&(o.prototype.option||(o.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=s.call(arguments,1);return l(this,t,e)}return h(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var s=Array.prototype.slice,o=t.console,r="undefined"==typeof o?function(){}:function(t){o.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,s=i[n];e=e||[];for(var o=this._onceEvents&&this._onceEvents[t];s;){var r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e),n+=r?0:1,s=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e