B2G/gecko/browser/components/tabview/iq.js
//     in, but "this" is set to the element that was animated.
in, but "this" is set to the element that was animated.
in but " this " is set to the element that was animated .
function iQClass_animate(css, options) {
    Utils.assert(this.length == 1, 'does not yet support multi-objects (or null objects)');
    if (!options)
      options = {};
    let easings = {
      tabviewBounce: "cubic-bezier(0.0, 0.63, .6, 1.29)", 
      easeInQuad: 'ease-in', 
      fast: 'cubic-bezier(0.7,0,1,1)'
    };
    let duration = (options.duration || 400);
    let easing = (easings[options.easing] || 'ease');
    if (css instanceof Rect) {
      css = {
        left: css.left,
        top: css.top,
        width: css.width,
        height: css.height
      };
    }
    let rupper = /([A-Z])/g;
    this.each(function(elem) {
      let cStyle = window.getComputedStyle(elem, null);
      for (let prop in css) {
        prop = prop.replace(rupper, "-$1").toLowerCase();
        iQ(elem).css(prop, cStyle.getPropertyValue(prop));
      }
    });
    this.css({
      'transition-property': Object.keys(css).join(", "),
      'transition-duration': (duration / 1000) + 's',
      'transition-timing-function': easing
    });
    this.css(css);
    let self = this;
    setTimeout(function() {
      self.css({
        'transition-property': 'none',
        'transition-duration': '',
        'transition-timing-function': ''
      });
      if (typeof options.complete == "function")
        options.complete.apply(self);
    }, duration);
    return this;
  }
function iQClass_animate ( css , options ) { Utils . assert ( this . length == 1 , 'does not yet support multi-objects (or null objects)' ) ; if ( ! options ) options = { } ; let easings = { tabviewBounce : "cubic-bezier(0.0, 0.63, .6, 1.29)" , easeInQuad : 'ease-in' , fast : 'cubic-bezier(0.7,0,1,1)' } ; let duration = ( options . duration || 400 ) ; let easing = ( easings [ options . easing ] || 'ease' ) ; if ( css instanceof Rect ) { css = { left : css . left , top : css . top , width : css . width , height : css . height } ; } let rupper = / ([A-Z]) / g ; this . each ( function ( elem ) { let cStyle = window . getComputedStyle ( elem , null ) ; for ( let prop in css ) { prop = prop . replace ( rupper , "-$1" ) . toLowerCase ( ) ; iQ ( elem ) . css ( prop , cStyle . getPropertyValue ( prop ) ) ; } } ) ; this . css ( { 'transition-property' : Object . keys ( css ) . join ( ", " ) , 'transition-duration' : ( duration / 1000 ) + 's' , 'transition-timing-function' : easing } ) ; this . css ( css ) ; let self = this ; setTimeout ( function ( ) { self . css ( { 'transition-property' : 'none' , 'transition-duration' : '' , 'transition-timing-function' : '' } ) ; if ( typeof options . complete == "function" ) options . complete . apply ( self ) ; } , duration ) ; return this ; }
in, but "this" is set to the element that was animated.
in but " this " is set to the element that was animated .
// TODO: make it a real easeInQuad, or decide we don't care // The latest versions of Firefox do not animate from a non-explicitly // set css properties. So for each element to be animated, go through // and explicitly define 'em.