diff --git a/src/modules/effect-coverflow/effect-coverflow.js b/src/modules/effect-coverflow/effect-coverflow.js index f84dbf5e6..efb1f8ff2 100644 --- a/src/modules/effect-coverflow/effect-coverflow.js +++ b/src/modules/effect-coverflow/effect-coverflow.js @@ -28,8 +28,11 @@ export default function EffectCoverflow({ swiper, extendParams, on }) { const $slideEl = slides.eq(i); const slideSize = slidesSizesGrid[i]; const slideOffset = $slideEl[0].swiperSlideOffset; - const offsetMultiplier = - ((center - slideOffset - slideSize / 2) / slideSize) * params.modifier; + const centerOffset = (center - slideOffset - slideSize / 2) / slideSize + const offsetMultiplier = + typeof params.modifier === 'function' ? + params.modifier(centerOffset) : + centerOffset * params.modifier; let rotateY = isHorizontal ? rotate * offsetMultiplier : 0; let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;