nextjs-morph-page icon indicating copy to clipboard operation
nextjs-morph-page copied to clipboard

Delay calculation of target element position

Open petertenhoor opened this issue 5 years ago • 2 comments

Hi again,

I have been working on a new component transition using this package from a Swiper Slide to a page: https://gyazo.com/c88c092d9845b0db9d239d71be331c1a

This works for all slides that are within the viewport at the moment the page transition is initiated. Because the Swiper instance positions the other slides after componentDidMount, the calculated position of the target element is incorrect.

Is it possible to delay the calculation of the target element position for the transition until a given condition is met (e.g. when the Swiper is full initiated)?

I noticed you have a prop called "loadingCallbackName" which kind of sounds like what I need. Is that prop functional and if so; how do you use it?

Best regards,

Peter ten Hoor

petertenhoor avatar Jun 28 '19 15:06 petertenhoor

@petertenhoor have you found a solution for this? the repo seems to be inactive and i'm having the same problem you have. I want the calculation to take place after a certain animation has executed.

doalef avatar Jan 22 '20 11:01 doalef

I realise this reply is super late to the party... but the link here explains how to do that: https://github.com/illinois/next-page-transitions/blob/master/README.md#support-for-delayed-enters

Irrelon avatar Feb 25 '22 01:02 Irrelon