update components
This commit is contained in:
parent
be99ee04d2
commit
86a369b500
20 changed files with 149 additions and 73 deletions
|
@ -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
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue