upd about marasi drive scroll slider fix

This commit is contained in:
2025-06-17 08:38:37 +05:00
parent 22527fd19a
commit 4e27a63d83
2 changed files with 10 additions and 14 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ function AboutMarasiDrive() {
alt=""
/>
</div>
<div className="h-[calc(27.639vw*10)]" ref={target}>
<div className="h-[calc(27.639vw*5)]" ref={target}>
<div className="flex flex-col 2xl:gap-[4.444vw] sticky top-[5vw]">
<div className="flex flex-col items-center 2xl:gap-[2.222vw]">
<h2 className="font-mixcase-unmixed text-h1 text-center whitespace-pre-line">
+9 -13
View File
@@ -11,34 +11,30 @@ function MarariDriveNeighboursSlider({
}: {
scrollYProgress: MotionValue<number>;
}) {
const x = useTransform(
scrollYProgress,
[0, 1 / 3, 2 / 3],
["4.236vw", "-20.868vw", "-45.972vw"]
);
const x = useTransform(scrollYProgress, [0, 1 / 3], ["4.236vw", "-20.868vw"]);
const width1 = useTransform(
scrollYProgress,
[0, 1 / 3, 2 / 3],
["20.139vw", "20.139vw", "20.139vw"]
[0, 1 / 3],
["20.139vw", "20.139vw"]
);
const width2 = useTransform(
scrollYProgress,
[0, 1 / 3, 2 / 3],
["36.944vw", "20.139vw", "20.139vw"]
[0, 1 / 3],
["36.944vw", "20.139vw"]
);
const width3 = useTransform(
scrollYProgress,
[0, 1 / 3, 2 / 3],
["20.139vw", "36.944vw", "20.139vw"]
[0, 1 / 3],
["20.139vw", "36.944vw"]
);
const width4 = useTransform(
scrollYProgress,
[0, 1 / 3, 2 / 3],
["20.139vw", "20.139vw", "36.944vw"]
[0, 1 / 3],
["20.139vw", "20.139vw"]
);
return (