oscarsidebo
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by oscarsidebo
-
-
Hey!
In this React example (sorry, I don't know how to embed codesandbox examples) I can't get the
onLeave
callback to fire.onEnter
works as intended, butonLeave
is not firing even tho, when logged, I see an element inlayoutState
not accounted for in the elements that I feed totargets
.
I hope the example is minimal enough 😬
Thanks in advance! -
That's it, thank you!
-
Hi,
I'm struggling to understand why my carousel here isn't wrapper back to the start (x=0) when using modifiers?
Am using flex-box to initially position the element, might that be why?
https://codesandbox.io/s/stupefied-microservice-s1unz?file=/src/App.js
-
@web_roll yes, thanks for this! Allowed me to understand the mechanics.
With that said I don't quite understand how the x: `+=${totalWidth}` works. (I've seen this on all similar examples)
Since gsap.to() targets all children elements here I'm assuming the x: += syntax is making the value dynamic?
If not how would it be different to just x: totalWidth ?
-
@USOBlake would your example be possible with boxes that have dynamic width? Struggling to implement that.
FLIP onLeave callback not firing
in GSAP
Posted
Thanks for a quick reply!
targets: q(".animationScope").concat(layoutState.targets)
does not seem to fix my issue.. 😞I guess I'm assuming Flip uses
getState
and diffs it againsttargets
to understand if a target is new or has disappeared. So that's what I'm console.logging, and as far as I can see, the element that was found in thegetState
-array is not in thetargets
-array, but still onLeave is not firing.Btw, I updated the example with your suggestion.