Code coverage report for lib/elements/animations.js

Statements: 44.44% (4 / 9)      Branches: 100% (0 / 0)      Functions: 0% (0 / 3)      Lines: 44.44% (4 / 9)      Ignored: none     

All files » lib/elements/ » animations.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44    1                 1                         1                         1            
'use strict';
 
var elements = require('../elements');
 
/**
 * Animate
 * @see http://updates.html5rocks.com/2014/05/Web-Animations---element-animate-is-now-in-Chrome-36
 * @param {HTMLElement} element
 * @param {Object} options
 * @return {AnimationPlayer}
 */
elements.animate = /** @function 
                   * @param element 
                   * @param animations 
                   * @param options */function (element, animations, options) {
    return element.animate(animations, options);
};
 
/**
 * Animate the opacity from 0 to 1
 * @param {HTMLElement} element
 * @param {Object} options
 * @return {AnimationPlayer}
 */
elements.fadeIn = /** @function 
                  * @param element 
                  * @param options */function (element, options) {
    elements.setStyle(element, 'opacity', 1);
    return elements.animate(element, [{ opacity: 0 }, { opacity: 1 }]);
};
 
/**
 * Animate the opacity from 1 to 0
 * @param {HTMLElement} element
 * @param {Object} options
 * @return {AnimationPlayer}
 */
elements.fadeIn = /** @function 
                  * @param element 
                  * @param options */function (element, options) {
    elements.setStyle(element, 'opacity', 0);
    return elements.animate(element, [{ opacity: 1 }, { opacity: 0 }]);
};
//# sourceMappingURL=animations.js.map