Hi there, I'm have an animation that changes the scale of an image from 0.6 to 1.
My problem is ScrollTrigger starts from a wrong position, I have an text in one of the upper sections, it has a line height of 80px, when I remove this lien-height it works good, that solves it but it's not the solution because I'm facing this in different pages and it's caused because of another element.
Also, I'm implementing this using Nuxt/Vuejs.
Here is my animation:
const tl = gsap.timeline().fromTo(
this.$refs["marquee-image"],
{
scale: 0.6,
transformOrigin: "50%",
},
{
scale: 1,
transformOrigin: "50%",
}
);
and this is ScrollTrigger config:
ScrollTrigger.create({
animation: tl,
trigger: this.$refs["marquee"],
scrub: true,
start: "top",
end: "+=1000",
pin: true,
});
Here is the start of the scroll trigger it should be on the start of the black area
That's my story, thanks in advance ☺️