Hi staff!
As the title says it can be a potential bug or the intended behavior. Let me explain:
In the above setup:
- first animation has out and in as usual (is the real swup transition)
- second animation only in (in used as a preloader and runs only on first page load and refresh, no session storage)
Now the problem: if I add another animation (in and out, not play on first visit) it wont run, and no console errors.
See for example the “overlay demo”: a classic fullscreen div that translate 100% plus a slight translate also applied to the body. A classic page transition animation.
With bricksforge to have the second animation in the page transition setup I have to run it on page load, so outside page transition logic (custom trigger).
Of course it works but is this the intended behaviour?
I also cannot use one single timeline because Bricksforge timelines ask for a main trigger to work and I have two distinct DOM elements (the fullscreen div and brxe-main - but it is only an example taht) and I cant have trigger: .classX, .classY
So, to have only one GSAP animation is the intended use with the swup js plugin or am I mistaking something?
Thank for the great work!
Daniele,
Could you please have a look at that?
Keeping it simple: page transition with JS accepts only one Brickscore GSAP timeline?
I’m not able to run another timeline. Instead it is possible to have only two timelines if one of them is settled to “run on page load” (and it makes sense). Keep in mind that “play on initial pageload” animation should be the second timeline, otherwise it will not work.
Why it is a problem?
-
is difficult to have a preloader with page transition because in the page transition environment bricksforge session storage (that one will use for preloader) won’t work, so you’ll have two animation running. (Conditional logic also don’t work by the way)
-
the solution seems to use page transition setup for the preloader and page transition. (Preloader animation settled to run on page load). It works wery well except for the issues reported above.
I think that fixing those minor issues will make the whole page transition environment more user friendly giving a boost to bricksforge power.
Currently, it is designed so that only one timeline is triggered, and within that timeline, you can create as many animations as you want. But I understand the issue with the conditions.
I’ll add it to our bug tracker and will include the option to trigger all timelines 
Yes, the option to trigger more than one timeline could be really useful! Thanks
1 Like