How to use the ember-css-transitions/utils/transition-utils.sleep function in ember-css-transitions

To help you get started, we’ve selected a few ember-css-transitions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peec / ember-css-transitions / addon / modifiers / css-transition.js View on Github external
// This is for to force a repaint,
    // which is necessary in order to transition styles when adding a class name.
    element.scrollTop;
    // add active class after repaint
    this.addClass(activeClassName);

    // if we're animating a class removal
    // we need to remove the class
    if (animationType === 'remove') {
      this.removeClass(transitionClass);
    }

    // wait for ember to apply classes
    // set timeout for animation end
    await sleep(computeTimeout(element) || 0);

    this.removeClass(className);
    this.removeClass(activeClassName);
  }

ember-css-transitions

Ember implementation of CSS Transitions. Just like ng-animate and react animation but for Ember.

MIT
Latest version published 2 months ago

Package Health Score

73 / 100
Full package analysis