Skip to content

Commit

Permalink
fix(controller): correct interpolation per slider
Browse files Browse the repository at this point in the history
fixes #6506
  • Loading branch information
nolimits4web committed Apr 14, 2023
1 parent e6247d9 commit 706fdf8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/modules/controller/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,10 @@ export default function Controller({ swiper, extendParams, on }) {
};
return this;
}
// xxx: for now i will just save one spline function to to
function getInterpolateFunction(c) {
if (!swiper.controller.spline) {
swiper.controller.spline = swiper.params.loop
? new LinearSpline(swiper.slidesGrid, c.slidesGrid)
: new LinearSpline(swiper.snapGrid, c.snapGrid);
}
swiper.controller.spline = swiper.params.loop
? new LinearSpline(swiper.slidesGrid, c.slidesGrid)
: new LinearSpline(swiper.snapGrid, c.snapGrid);
}
function setTranslate(_t, byController) {
const controlled = swiper.controller.control;
Expand Down

0 comments on commit 706fdf8

Please sign in to comment.