update components

This commit is contained in:
Luke Pulverenti 2016-10-06 00:28:10 -04:00
parent be99ee04d2
commit 86a369b500
20 changed files with 149 additions and 73 deletions

View file

@ -34,9 +34,8 @@
}, false);
}
function animateButton(e) {
function animateButton(e, btn) {
var btn = this;
requestAnimationFrame(function () {
animateButtonInternal(e, btn);
});
@ -45,10 +44,15 @@
function onKeyDown(e) {
if (e.keyCode === 13) {
animateButton.call(this, e);
animateButton(e, this);
}
}
function onClick(e) {
animateButton(e, this);
}
EmbyButtonPrototype.createdCallback = function () {
if (this.classList.contains('paper-icon-button-light')) {
@ -61,7 +65,7 @@
dom.addEventListener(this, 'keydown', onKeyDown, {
passive: true
});
dom.addEventListener(this, 'click', animateButton, {
dom.addEventListener(this, 'click', onClick, {
passive: true
});
}