May be I do something wrong as I am new. But…
I am trying to animate my sticker header. It is a complex animation that needs elements to change layout + one element is scaled and transmitted.
I use GSAP flip actions to add classes to elements with final state. And I created a timeline for the scaled&transmitted element. + 2 add class actions for element to delay few css changes.
All classes are desctibed in external file (not in bricks interface)
And I have put all actions on Scroll Position event. It seems to work glitchy. It SOMETIMES works fine, but mostly not. Tineline animated element should be scaled and become transparent, but animates with convulsions it returns in the end. I see a “brf-reset-transition” class in Inspector. If I set a delay of 4000ms on timeline action - it works perfect. But it’s too big delay. Duration of all previous animations is 1s or less.
There is also a problem with Flip. You will see on the video that sometimes the logo also have convulsions (when I stop scrolling very close to the “borderline” scroll position ), jumps to the position where it should not be at all. And menu items are moving a bit after the transition is over.
here is the screencast of the problem https://youtu.be/I3nzqd2cF8Y (video is restricted with link access)
here is the address of the page https://biezoender.avar.com.ua/
Here are the classes added during the animation:
.header-container-scroll {
align-self: center;
align-items: flex-end;
flex-direction: row;
display: flex;
justify-content: space-between;
}
.header-logo-wrapper-scroll {
flex-direction: row;
align-self: flex-start;
max-width: 300px;
margin-top: 1rem;
margin-bottom: 1rem;
- {padding-bottom:0;} }
.top-menu-scroll {
margin-bottom: 0;
}
.adress-scroll {
top: 1rem; flex-direction: column; align-items: flex-end;
>i {font-size: 30px !important;}
}
here is the text of JSON export of instance (in case you need it to reproduce)
{“name”:“Header Scroll Animation 1”,“id”:“4470667f-c8a4-9f93-4754-ec9b891016fa”,“selector”:“”,“event”:“scrollPosition”,“actions”:[{“id”:“e14f2215-851d-4cc8-7ab0-4907b468777a”,“action”:{“label”:“GSAP Flip”,“value”:“gsapFlip”,“gsapSetObject”:“{}”,“target”:“custom”,“targetElement”:“#header-logo-wrapper”,“flipStylesInput”:“addClass”,“flipStylesInputClassName”:“header-logo-wrapper-scroll”,“flipDuration”:1,“flipIncludeChildren”:true,“flipEase”:“power1.out”},“conditions”:},{“id”:“6d388c19-74ec-b964-5762-e149c6306273”,“action”:{“label”:“GSAP Flip”,“value”:“gsapFlip”,“gsapSetObject”:“{}”,“target”:“custom”,“targetElement”:“#top-menu .bricks-nav-menu”,“flipStylesInput”:“custom”,“flipStylesCode”:“target.style.justifyContent = "end"; \ntarget.style.gap = "3.5rem"; “,“flipDuration”:0.7,“flipIncludeChildren”:true,“flipEase”:“power1.out”,“flipStylesInputClassName”:””},“conditions”:},{“id”:“bd3ae1b5-3757-b5c8-36fa-e935c6882fe0”,“action”:{“label”:“Add Class”,“value”:“addClass”,“gsapSetObject”:“{}”,“target”:“custom”,“targetElement”:“#header-container”,“cssClass”:“header-container-scroll”,“delay”:60},“conditions”:},{“id”:“e9e5dcf0-204d-40cf-3552-64932c9fab2b”,“action”:{“label”:“Add Class”,“value”:“addClass”,“gsapSetObject”:“{}”,“target”:“custom”,“targetElement”:“#top-menu”,“cssClass”:“top-menu-scroll”,“delay”:120},“conditions”:},{“id”:“6ea69de9-2457-ae61-d17a-53a091e3a576”,“action”:{“label”:“GSAP Flip”,“value”:“gsapFlip”,“gsapSetObject”:“{}”,“target”:“custom”,“targetElement”:“#adress”,“flipStylesInput”:“addClass”,“flipStylesInputClassName”:“adress-scroll”,“flipIncludeChildren”:true,“flipDuration”:0.7,“flipEase”:“power1.out”},“conditions”:},{“id”:“93e9ba75-7f71-2bdf-390c-b9a5c9a6432c”,“action”:{“label”:“GSAP Timeline”,“value”:“gsap”,“gsapSetObject”:“{}”,“animationAction”:“play”,“animationTimeline”:“e5fab112-9d92-12c7-2519-67d7f801bc86”,“animationSelectorType”:“all”,“delay”:1500},“conditions”:}],“selectorType”:“exactly”,“consoleLog”:“none”,“display”:“block”,“mutationObserverAttributes”:true,“conditions”:,“conditionsRelation”:“and”,“loadOnChoice”:“everywhere”,“preventDefault”:false,“loadOn”:“”,“disabled”:true,“folder”:0,“scrollPositionOperator”:“>=”,“scrollPosition”:“150”}