As I understand it, in barba js the house is updated between the afterEnter and after events In my case, in the afterEnter event, when we create the scrollTrigger again, the coordinates of the trigger block most likely did not correspond to the block coordinates, I think that this may be due to the fact that transition has negative coordinates, in order to trigger, as I understand it, you need to create an element in the after event.
barba.hooks.after((data) => {
switch (data.next.namespace) {
case 'main': {
let triggers = ScrollTrigger.getAll();
console.log(triggers);
triggers.forEach(trigger => {
trigger.kill();
});
scaleLogo = createScrollTrigger();
}
case 'works': {
}
}
})