callbacks are triggering when animation begins #19

Closed
reduxdj opened this Issue Feb 2, 2013 · 2 comments

Comments

Projects
None yet
3 participants

reduxdj commented Feb 2, 2013

Shouldn't they be called after the animation complete, calculated by total duration and any delays?

altano commented May 13, 2013

They are working fine for me. This is some rough code but I've been using it and the callback works correctly:

var hideContainerElement = function() {
  clearFeedbackTimeoutCheck();

  var resetPositionAndHide = function() {
    // Hide the element and then instantly move it back to the original position
    containerElement.style.display = "none";
    move(containerElement)
      .y(0)
      .duration('0s')
      .end();

    removeFromDOM();

    removeAllMessages();
  };

  // Slide-up animation
  move(containerElement)
    .y(containerElement.offsetHeight * -1)
    .duration(moveDuration)
    .then(resetPositionAndHide)
    .end();
};

You might want to paste the code that isn't working correctly for you.

Contributor

yields commented Sep 16, 2013

closing, if this is still an issue feel free to open :)

@yields yields closed this Sep 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment