'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 |