Skip to content

Commit

Permalink
👷 build v2.0.6; update dependencies
Browse files Browse the repository at this point in the history
🛠 add Flickity.setJQuery
⬆️ matchesSelector v2.0.2
⬆️ fizzyUIUtils v2.0.5
⬆️ unipointer & unidragger v2.2.0
  • Loading branch information
desandro committed May 15, 2017
1 parent 730c1a6 commit 7523599
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 45 deletions.
2 changes: 1 addition & 1 deletion css/flickity.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Flickity v2.0.5
/*! Flickity v2.0.6
http://flickity.metafizzy.co
---------------------------------------------- */

Expand Down
2 changes: 1 addition & 1 deletion dist/flickity.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Flickity v2.0.5
/*! Flickity v2.0.6
http://flickity.metafizzy.co
---------------------------------------------- */

Expand Down
2 changes: 1 addition & 1 deletion dist/flickity.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 22 additions & 37 deletions dist/flickity.pkgd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Flickity PACKAGED v2.0.5
* Flickity PACKAGED v2.0.6
* Touch, responsive, flickable carousels
*
* Licensed GPLv3 for open source use
Expand Down Expand Up @@ -474,7 +474,7 @@ return getSize;
});

/**
* matchesSelector v2.0.1
* matchesSelector v2.0.2
* matchesSelector( element, '.selector' )
* MIT license
*/
Expand All @@ -500,7 +500,7 @@ return getSize;
'use strict';

var matchesMethod = ( function() {
var ElemProto = Element.prototype;
var ElemProto = window.Element.prototype;
// check for the standard method name first
if ( ElemProto.matches ) {
return 'matches';
Expand Down Expand Up @@ -528,7 +528,7 @@ return getSize;
}));

/**
* Fizzy UI utils v2.0.3
* Fizzy UI utils v2.0.5
* MIT license
*/

Expand Down Expand Up @@ -589,7 +589,8 @@ utils.makeArray = function( obj ) {
if ( Array.isArray( obj ) ) {
// use object if already an array
ary = obj;
} else if ( obj && typeof obj.length == 'number' ) {
} else if ( obj && typeof obj == 'object' &&
typeof obj.length == 'number' ) {
// convert nodeList to array
for ( var i=0; i < obj.length; i++ ) {
ary.push( obj[i] );
Expand All @@ -613,7 +614,7 @@ utils.removeFrom = function( ary, obj ) {
// ----- getParent ----- //

utils.getParent = function( elem, selector ) {
while ( elem != document.body ) {
while ( elem.parentNode && elem != document.body ) {
elem = elem.parentNode;
if ( matchesSelector( elem, selector ) ) {
return elem;
Expand Down Expand Up @@ -1998,14 +1999,19 @@ 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;

}));

/*!
* Unipointer v2.1.0
* Unipointer v2.2.0
* base class for doing one thing with pointer event
* MIT license
*/
Expand Down Expand Up @@ -2064,12 +2070,9 @@ proto._bindStartEvent = function( elem, isBind ) {
isBind = isBind === undefined ? true : !!isBind;
var bindMethod = isBind ? 'addEventListener' : 'removeEventListener';

if ( window.navigator.pointerEnabled ) {
// W3C Pointer Events, IE11. See https://coderwall.com/p/mfreca
if ( window.PointerEvent ) {
// Pointer Events. Chrome 55, IE11, Edge 14
elem[ bindMethod ]( 'pointerdown', this );
} else if ( window.navigator.msPointerEnabled ) {
// IE10 Pointer Events
elem[ bindMethod ]( 'MSPointerDown', this );
} else {
// listen for both, for devices like Chrome Pixel
elem[ bindMethod ]( 'mousedown', this );
Expand Down Expand Up @@ -2110,7 +2113,6 @@ proto.ontouchstart = function( event ) {
this._pointerDown( event, event.changedTouches[0] );
};

proto.onMSPointerDown =
proto.onpointerdown = function( event ) {
this._pointerDown( event, event );
};
Expand Down Expand Up @@ -2145,7 +2147,6 @@ var postStartEvents = {
mousedown: [ 'mousemove', 'mouseup' ],
touchstart: [ 'touchmove', 'touchend', 'touchcancel' ],
pointerdown: [ 'pointermove', 'pointerup', 'pointercancel' ],
MSPointerDown: [ 'MSPointerMove', 'MSPointerUp', 'MSPointerCancel' ]
};

proto._bindPostStartEvents = function( event ) {
Expand Down Expand Up @@ -2180,7 +2181,6 @@ proto.onmousemove = function( event ) {
this._pointerMove( event, event );
};

proto.onMSPointerMove =
proto.onpointermove = function( event ) {
if ( event.pointerId == this.pointerIdentifier ) {
this._pointerMove( event, event );
Expand Down Expand Up @@ -2216,7 +2216,6 @@ proto.onmouseup = function( event ) {
this._pointerUp( event, event );
};

proto.onMSPointerUp =
proto.onpointerup = function( event ) {
if ( event.pointerId == this.pointerIdentifier ) {
this._pointerUp( event, event );
Expand Down Expand Up @@ -2262,7 +2261,6 @@ proto.pointerDone = noop;

// ----- pointer cancel ----- //

proto.onMSPointerCancel =
proto.onpointercancel = function( event ) {
if ( event.pointerId == this.pointerIdentifier ) {
this._pointerCancel( event, event );
Expand Down Expand Up @@ -2309,7 +2307,7 @@ return Unipointer;
}));

/*!
* Unidragger v2.1.0
* Unidragger v2.2.0
* Draggable base class
* MIT license
*/
Expand Down Expand Up @@ -2374,27 +2372,14 @@ var navigator = window.navigator;
proto._bindHandles = function( isBind ) {
// munge isBind, default to true
isBind = isBind === undefined ? true : !!isBind;
// extra bind logic
var binderExtra;
if ( navigator.pointerEnabled ) {
binderExtra = function( handle ) {
// disable scrolling on the element
handle.style.touchAction = isBind ? 'none' : '';
};
} else if ( navigator.msPointerEnabled ) {
binderExtra = function( handle ) {
// disable scrolling on the element
handle.style.msTouchAction = isBind ? 'none' : '';
};
} else {
binderExtra = noop;
}
// disable scrolling via touch
var touchActionValue = isBind ? 'none' : '';
// bind each handle
var bindMethod = isBind ? 'addEventListener' : 'removeEventListener';
for ( var i=0; i < this.handles.length; i++ ) {
var handle = this.handles[i];
this._bindStartEvent( handle, isBind );
binderExtra( handle );
handle.style.touchAction = touchActionValue;
handle[ bindMethod ]( 'click', this );
}
};
Expand Down Expand Up @@ -4010,7 +3995,7 @@ return Flickity;
}));

/*!
* Flickity v2.0.5
* Flickity v2.0.6
* Touch, responsive, flickable carousels
*
* Licensed GPLv3 for open source use
Expand Down Expand Up @@ -4204,7 +4189,7 @@ return Flickity;
}));

/*!
* imagesLoaded v4.1.1
* imagesLoaded v4.1.2
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
Expand Down Expand Up @@ -4235,7 +4220,7 @@ return Flickity;
);
}

})( window,
})( typeof window !== 'undefined' ? window : this,

// -------------------------- factory -------------------------- //

Expand Down
6 changes: 3 additions & 3 deletions dist/flickity.pkgd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Flickity v2.0.5
* Flickity v2.0.6
* Touch, responsive, flickable carousels
*
* Licensed GPLv3 for open source use
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flickity",
"version": "2.0.5",
"version": "2.0.6",
"description": "Touch, responsive, flickable carousels",
"main": "js/index.js",
"style": "css/flickity.css",
Expand Down

1 comment on commit 7523599

@zub0r
Copy link

@zub0r zub0r commented on 7523599 Jun 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be breaking scrolling of the whole page by dragging slides. Tested in Chrome & Firefox, 2.0.5 works fine.

Please sign in to comment.