Skip to content

Commit

Permalink
fix(Gallery): remove add slide change animation to queue at not loope…
Browse files Browse the repository at this point in the history
…d gallery
  • Loading branch information
EldarMuhamethanov committed Feb 18, 2025
1 parent c708d03 commit 653f453
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/vkui/src/components/CarouselBase/CarouselBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,7 @@ export const CarouselBase = ({

const simpleSlideChangePerform = () => {
const { snaps } = slidesManager.current;
const startPoint = shiftXCurrentRef.current;
const endPoint = snaps[slideIndex];
const distance = endPoint - startPoint;
addToAnimationQueue(
getAnimateFunction((progress) => transformCssStyles(startPoint + distance * progress)),
);
requestTransform(snaps[slideIndex], true);
};

useIsomorphicLayoutEffect(
Expand Down

0 comments on commit 653f453

Please sign in to comment.