Jump to content
Search Community

maimairel

Members
  • Posts

    3
  • Joined

  • Last visited

maimairel's Achievements

0

Reputation

  1. clearProps: 'visibility,opacity,y' Last thing, will the clearProps I have in my code applied to the elements if I call progress(1) before killing the timeline? Thank you it's clear now
  2. Hi Carl, Thanks for your answer Glad to hear that the code is fine. Another question just to be sure. Would progress( 1 ).kill().clear(true) ensures that the timeline completes all animations, call all complete callbacks, and reset its state to the initial state like when you create a new TimelineLite object? Thank you!
  3. Hello, I've been working on a project using GSAP for filtering and hiding items in a grid layout (filtering like the one on the jQuery.isotope plugin). The grid is put in a container that has one instance of TimelineLite that I reuse each time the filtering is triggered. This is what I have: this._timeline.progress( 1 ).kill().clear( true ) .to( hide, 0.2, { autoAlpha: 0, y: -30, onComplete: function() { // my code here } }) .staggerFromTo( show, 0.2, { opacity: 0, y: -30 }, { autoAlpha: 1, y: 0, clearProps: 'visibility,opacity,y' }, 0.1, '+=0', this.options.afterFilter, null, this.options.afterFilterScope ).play(); In this code, hide are the items to be hidden and show are the items to be shown. The question is, I'm not sure whether the code I'm using on this grid is free from memory leaks, free from uncompleted animations (where an item has only say 40% opacity or hangs halfway because the y property hasn't finished animating) and that all callbacks are called when a user triggers this piece of code very quickly. Here's the live example (a WordPress theme): http://wp.youxithemes.com/helium/ Thank you!
×
×
  • Create New...