Skip to content

Commit

Permalink
🏗 v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
desandro committed Dec 19, 2021
1 parent 2b36649 commit 69a7662
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 34 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.2.2
/*! Flickity v2.3.0
https://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.2.2
/*! Flickity v2.3.0
https://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.

41 changes: 21 additions & 20 deletions dist/flickity.pkgd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Flickity PACKAGED v2.2.2
* Flickity PACKAGED v2.3.0
* Touch, responsive, flickable carousels
*
* Licensed GPLv3 for open source use
Expand Down Expand Up @@ -813,6 +813,7 @@ proto.create = function() {
this.element.setAttribute( 'aria-hidden', 'true' );
this.x = 0;
this.shift = 0;
this.element.style[ this.parent.originSide ] = 0;
};

proto.destroy = function() {
Expand All @@ -821,6 +822,7 @@ proto.destroy = function() {
this.element.style.position = '';
var side = this.parent.originSide;
this.element.style[ side ] = '';
this.element.style.transform = '';
this.element.removeAttribute('aria-hidden');
};

Expand All @@ -843,8 +845,14 @@ proto.updateTarget = proto.setDefaultTarget = function() {

proto.renderPosition = function( x ) {
// render position of cell with in slider
var side = this.parent.originSide;
this.element.style[ side ] = this.parent.getPositionValue( x );
var sideOffset = this.parent.originSide === 'left' ? 1 : -1;

var adjustedX = this.parent.options.percentPosition ?
x * sideOffset * ( this.parent.size.innerWidth / this.size.width ) :
x * sideOffset;

this.element.style.transform = 'translateX(' +
this.parent.getPositionValue( adjustedX ) + ')';
};

proto.select = function() {
Expand Down Expand Up @@ -1934,7 +1942,8 @@ proto.onresize = function() {
utils.debounceMethod( Flickity, 'onresize', 150 );

proto.resize = function() {
if ( !this.isActive ) {
// #1177 disable resize behavior when animating or dragging for iOS 15
if ( !this.isActive || this.isAnimating || this.isDragging ) {
return;
}
this.getSize();
Expand Down Expand Up @@ -2087,7 +2096,7 @@ return Flickity;
} ) );

/*!
* Unipointer v2.3.0
* Unipointer v2.4.0
* base class for doing one thing with pointer event
* MIT license
*/
Expand Down Expand Up @@ -2148,12 +2157,13 @@ proto._bindStartEvent = function( elem, isAdd ) {

// default to mouse events
var startEvent = 'mousedown';
if ( window.PointerEvent ) {
if ( 'ontouchstart' in window ) {
// HACK prefer Touch Events as you can preventDefault on touchstart to
// disable scroll in iOS & mobile Chrome metafizzy/flickity#1177
startEvent = 'touchstart';
} else if ( window.PointerEvent ) {
// Pointer Events
startEvent = 'pointerdown';
} else if ( 'ontouchstart' in window ) {
// Touch Events. iOS Safari
startEvent = 'touchstart';
}
elem[ bindMethod ]( startEvent, this );
};
Expand Down Expand Up @@ -2389,7 +2399,7 @@ return Unipointer;
}));

/*!
* Unidragger v2.3.1
* Unidragger v2.4.0
* Draggable base class
* MIT license
*/
Expand Down Expand Up @@ -2725,21 +2735,12 @@ proto._touchActionValue = 'pan-y';

// -------------------------- -------------------------- //

var isTouch = 'createTouch' in document;
var isTouchmoveScrollCanceled = false;

proto._createDrag = function() {
this.on( 'activate', this.onActivateDrag );
this.on( 'uiChange', this._uiChangeDrag );
this.on( 'deactivate', this.onDeactivateDrag );
this.on( 'cellChange', this.updateDraggable );
// TODO updateDraggable on resize? if groupCells & slides change
// HACK - add seemingly innocuous handler to fix iOS 10 scroll behavior
// #457, RubaXa/Sortable#973
if ( isTouch && !isTouchmoveScrollCanceled ) {
window.addEventListener( 'touchmove', function() {} );
isTouchmoveScrollCanceled = true;
}
};

proto.onActivateDrag = function() {
Expand Down Expand Up @@ -3959,7 +3960,7 @@ return Flickity;
} ) );

/*!
* Flickity v2.2.2
* Flickity v2.3.0
* Touch, responsive, flickable carousels
*
* Licensed GPLv3 for open source use
Expand Down
14 changes: 7 additions & 7 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.2.2
* Flickity v2.3.0
* Touch, responsive, flickable carousels
*
* Licensed GPLv3 for open source use
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

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.2.2",
"version": "2.3.0",
"description": "Touch, responsive, flickable carousels",
"main": "js/index.js",
"style": "css/flickity.css",
Expand Down

0 comments on commit 69a7662

Please sign in to comment.