-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Check that this is really a bug
- I confirm
Reproduction link
https://codesandbox.io/s/smoosh-pond-4qwv1?file=/src/index.tsx
Bug description
When using slidesPerView or slidesOffsetBefore in creative-effect, progress should be 1, but now it is applied with the same value as 0.936364~~~
My Setting here.
<Swiper
effect="creative"
modules={[EffectCreative]}
loop
roundLengths
slidesPerView={1.42}
slidesOffsetBefore={56}
slidesOffsetAfter={71}
creativeEffect={{
limitProgress: 2,
prev: {
opacity: 0,
scale: 0.8,
translate: ["-72.2%", 0, 0],
},
next: {
opacity: 0.7,
scale: 0.8,
translate: ["72.2%", 0, 0],
},
}}
>
{items.map((color, index) => (
<SwiperSlide key={index}>
<Item color={color}>{index + 1}</Item>
</SwiperSlide>
))}
</Swiper>Expected Behavior
active opacity: 1
prev opacity: 0
next opacity: 0.7
Actual Behavior
active opacity: 0.954717
prev opacity: 0.150943
next opacity: 0.654717
Swiper version
7.0.8
Platform/Target and Browser Versions
macOS, Windows, iOS 15 Safari, Android 10
Validations
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- Make sure this is a Swiper issue and not a framework-specific issue
Would you like to open a PR for this bug?
- I'm willing to open a PR
Metadata
Metadata
Assignees
Labels
No labels