1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-06-25 16:18:23 -04:00
parent 4d618da015
commit 1fd4ea266c
7 changed files with 56 additions and 17 deletions

View file

@ -1,7 +1,15 @@
define(['css!./emby-button', 'registerElement'], function () {
define(['browser', 'css!./emby-button', 'registerElement'], function (browser) {
var EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
function enableAnimation() {
if (browser.tv) {
// too slow
return false;
}
return true;
}
function animateButtonInternal(e, btn) {
var div = document.createElement('div');
@ -46,8 +54,10 @@
this.setAttribute('data-embybutton', 'true');
this.addEventListener('keydown', onKeyDown);
this.addEventListener('click', animateButton);
if (enableAnimation()) {
this.addEventListener('keydown', onKeyDown);
this.addEventListener('click', animateButton);
}
};
document.registerElement('paper-icon-button-light', {