mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
chore(): update deps (#17195)
This commit is contained in:
@ -762,7 +762,7 @@ function add(...args) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Swiper 4.4.2
|
||||
* Swiper 4.4.6
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* http://www.idangero.us/swiper/
|
||||
*
|
||||
@ -770,7 +770,7 @@ function add(...args) {
|
||||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: November 1, 2018
|
||||
* Released on: December 19, 2018
|
||||
*/
|
||||
|
||||
const Methods = {
|
||||
@ -929,7 +929,7 @@ const Support = (function Support() {
|
||||
const testDiv = doc.createElement('div');
|
||||
return {
|
||||
touch: (win.Modernizr && win.Modernizr.touch === true) || (function checkTouch() {
|
||||
return !!(('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch));
|
||||
return !!((win.navigator.maxTouchPoints > 0) || ('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch));
|
||||
}()),
|
||||
|
||||
pointerEvents: !!(win.navigator.pointerEnabled || win.PointerEvent || ('maxTouchPoints' in win.navigator)),
|
||||
@ -1236,7 +1236,7 @@ function updateSlides () {
|
||||
let slideSize;
|
||||
const slidesPerColumn = params.slidesPerColumn;
|
||||
const slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
|
||||
const numFullColumns = slidesPerRow - ((params.slidesPerColumn * slidesPerRow) - slidesLength);
|
||||
const numFullColumns = Math.floor(slidesLength / params.slidesPerColumn);
|
||||
for (let i = 0; i < slidesLength; i += 1) {
|
||||
slideSize = 0;
|
||||
const slide = slides.eq(i);
|
||||
@ -1295,13 +1295,29 @@ function updateSlides () {
|
||||
} else {
|
||||
// eslint-disable-next-line
|
||||
if (swiper.isHorizontal()) {
|
||||
slideSize = parseFloat(slideStyles.getPropertyValue('width'))
|
||||
+ parseFloat(slideStyles.getPropertyValue('margin-left'))
|
||||
+ parseFloat(slideStyles.getPropertyValue('margin-right'));
|
||||
const width$$1 = parseFloat(slideStyles.getPropertyValue('width'));
|
||||
const paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left'));
|
||||
const paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right'));
|
||||
const marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left'));
|
||||
const marginRight = parseFloat(slideStyles.getPropertyValue('margin-right'));
|
||||
const boxSizing = slideStyles.getPropertyValue('box-sizing');
|
||||
if (boxSizing && boxSizing === 'border-box') {
|
||||
slideSize = width$$1 + marginLeft + marginRight;
|
||||
} else {
|
||||
slideSize = width$$1 + paddingLeft + paddingRight + marginLeft + marginRight;
|
||||
}
|
||||
} else {
|
||||
slideSize = parseFloat(slideStyles.getPropertyValue('height'))
|
||||
+ parseFloat(slideStyles.getPropertyValue('margin-top'))
|
||||
+ parseFloat(slideStyles.getPropertyValue('margin-bottom'));
|
||||
const height$$1 = parseFloat(slideStyles.getPropertyValue('height'));
|
||||
const paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top'));
|
||||
const paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom'));
|
||||
const marginTop = parseFloat(slideStyles.getPropertyValue('margin-top'));
|
||||
const marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom'));
|
||||
const boxSizing = slideStyles.getPropertyValue('box-sizing');
|
||||
if (boxSizing && boxSizing === 'border-box') {
|
||||
slideSize = height$$1 + marginTop + marginBottom;
|
||||
} else {
|
||||
slideSize = height$$1 + paddingTop + paddingBottom + marginTop + marginBottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (currentTransform) {
|
||||
@ -2190,7 +2206,7 @@ function loopFix () {
|
||||
function loopDestroy () {
|
||||
const swiper = this;
|
||||
const { $wrapperEl, params, slides } = swiper;
|
||||
$wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
|
||||
$wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();
|
||||
slides.removeAttr('data-swiper-slide-index');
|
||||
}
|
||||
|
||||
@ -4039,7 +4055,7 @@ const Observer = {
|
||||
}
|
||||
}
|
||||
// Observe container
|
||||
swiper.observer.attach(swiper.$el[0], { childList: false });
|
||||
swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren });
|
||||
|
||||
// Observe wrapper
|
||||
swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
|
||||
@ -4058,6 +4074,7 @@ var Observer$1 = {
|
||||
params: {
|
||||
observer: false,
|
||||
observeParents: false,
|
||||
observeSlideChildren: false,
|
||||
},
|
||||
create() {
|
||||
const swiper = this;
|
||||
@ -4999,7 +5016,7 @@ const Zoom = {
|
||||
}
|
||||
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
||||
if (Support.gestures) {
|
||||
swiper.zoom.scale = e.scale * zoom.currentScale;
|
||||
zoom.scale = e.scale * zoom.currentScale;
|
||||
} else {
|
||||
zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
|
||||
}
|
||||
@ -5181,12 +5198,13 @@ const Zoom = {
|
||||
if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
|
||||
gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
|
||||
gesture.$imageWrapEl.transform('translate3d(0,0,0)');
|
||||
gesture.$slideEl = undefined;
|
||||
gesture.$imageEl = undefined;
|
||||
gesture.$imageWrapEl = undefined;
|
||||
|
||||
zoom.scale = 1;
|
||||
zoom.currentScale = 1;
|
||||
|
||||
gesture.$slideEl = undefined;
|
||||
gesture.$imageEl = undefined;
|
||||
gesture.$imageWrapEl = undefined;
|
||||
}
|
||||
},
|
||||
// Toggle Zoom
|
||||
@ -5408,12 +5426,28 @@ var zoom = {
|
||||
prevTime: undefined,
|
||||
},
|
||||
};
|
||||
|
||||
('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach((methodName) => {
|
||||
zoom[methodName] = Zoom[methodName].bind(swiper);
|
||||
});
|
||||
Utils.extend(swiper, {
|
||||
zoom,
|
||||
});
|
||||
|
||||
let scale = 1;
|
||||
Object.defineProperty(swiper.zoom, 'scale', {
|
||||
get() {
|
||||
return scale;
|
||||
},
|
||||
set(value) {
|
||||
if (scale !== value) {
|
||||
const imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined;
|
||||
const slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined;
|
||||
swiper.emit('zoomChange', value, imageEl, slideEl);
|
||||
}
|
||||
scale = value;
|
||||
},
|
||||
});
|
||||
},
|
||||
on: {
|
||||
init() {
|
||||
|
Reference in New Issue
Block a user