Jump to content
Search Community

oscarsidebo

Premium
  • Posts

    6
  • Joined

  • Last visited

Posts posted by oscarsidebo

  1. 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 against targets 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 the getState-array is not in the targets-array, but still onLeave is not firing. 

    Btw, I updated the example with your suggestion.

  2. 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, but onLeave is not firing even tho, when logged, I see an element in layoutState not accounted for in the elements that I feed to targets.

    I hope the example is minimal enough 😬
    Thanks in advance!

    See the Pen by s (@s) on CodePen

  3. @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 ?

     

×
×
  • Create New...