Base edit view

This commit is contained in:
2015-08-28 14:20:07 +02:00
parent 9d79aad801
commit f61ac744a9
10 changed files with 364 additions and 222 deletions

View File

@ -0,0 +1,23 @@
var Events = {
ANIMATION_END: 'webkitAnimationEnd'
};
module.exports = {
play: function(component, animation) {
return new Promise(function(resolve, reject) {
var el = component.getDOMNode();
el.addEventListener(Events.ANIMATION_END, onAnimEnd, false);
el.style.webkitAnimation = animation;
function onAnimEnd(evt) {
el.removeEventListener(Events.ANIMATION_END, onAnimEnd);
return resolve(el);
}
});
}
};