@mvaneijgen Thank
Demo Part 2
https://codepen.io/paallaire/pen/xxeKeLe?editors=1010
I think I found a solution:
Put the cards in "absolute" position
Add a height on the wrapper with a "set" (according to height of the 2nd card + the percentage of translation in Y).
However adding the height to the "set" wrapper does not update when resizing the window
Does gsap have anything to handle this case? Like invalidateOnRefresh for set ?
gsap.set(block, {
height: () => {
const containerHeight = items[1].offsetHeight + items[1].offsetHeight * 0.2;
return containerHeight;
},
onComplete() {
console.log('onComplete:');
animation();
}
});