extensions/amp-carousel/0.1/slidescroll.js
/**
   * Animate scrollLeft of the container.
   * @param {number} fromScrollLeft.
   * @param {number} toScrollLeft.
   * @return {!Promise}
   * @private
   */
Animate scrollLeft of the container.
Animate scrollLeft of the container .
animateScrollLeft_(fromScrollLeft, toScrollLeft) {
    if (fromScrollLeft == toScrollLeft) {
      return Promise.resolve();
    }
    const interpolate = numeric(fromScrollLeft, toScrollLeft);
    const curve = bezierCurve(0.4, 0, 0.2, 1); 
    const duration = 80;
    const slidesContainer = dev().assertElement(this.slidesContainer_);
    return Animation.animate(slidesContainer, pos => {
      this.slidesContainer_.scrollLeft = interpolate(pos);
    }, duration, curve).thenAlways();
  }
animateScrollLeft_ ( fromScrollLeft , toScrollLeft ) { if ( fromScrollLeft == toScrollLeft ) { return Promise . resolve ( ) ; } const interpolate = numeric ( fromScrollLeft , toScrollLeft ) ; const curve = bezierCurve ( 0.4 , 0 , 0.2 , 1 ) ; const duration = 80 ; const slidesContainer = dev ( ) . assertElement ( this . slidesContainer_ ) ; return Animation . animate ( slidesContainer , pos => { this . slidesContainer_ . scrollLeft = interpolate ( pos ) ; } , duration , curve ) . thenAlways ( ) ; }
Animate scrollLeft of the container.
Animate scrollLeft of the container .
/** @const {!TransitionDef<number>} */ // fast-out-slow-in /*OK*/