Jump to content
Search Community

justonequestion

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

justonequestion's Achievements

0

Reputation

  1. Thanks, Carl -- I like the concept of returning timelines out of functions, that will be helpful. It sounds like I had it right in terms of setup, then, and tracking everything with variables?
  2. Hello Sahil, thanks for your reply. Here's a demo.
  3. Hi everyone, I've been working with GSAP for a little while now and feel comfortable with tweening elements. Tweening elements back to their start positions has been a whole different ballgame, though. I have something inelegant working, but I feel like I may be missing The Right Way to think about this. So I needed to slide open a search box when it was clicked on. I created a timeline, added some .to tweens, done. Now if someone clicked the close button, I needed to get back to the start. I thought first that I would simply reverse my timeline, but the easing that looked good when played forward didn't look as good when it was being played backwards. So I created a new timeline that essentially repeats the first one, just with some different easing. And since I'm not reversing, I now needed to declare what to tween back to. I created a bunch of variables that made a note of what the heights and widths of the various DOM elements were upon the first page load. This seems like a lot of bookkeeping, though, which is what made me think I was missing something. Here are my two questions, one general and one specific: am I missing anything? And is there a smarter way of accessing initial values? I saw a few posts that talked about an object, ._gsTransform, but didn't have much luck accessing it. Happy to take another run at that if it's the way to go.
×
×
  • Create New...