mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
7dbb1f7535
commit
b447272b19
26 changed files with 478 additions and 107 deletions
|
@ -58,6 +58,10 @@ how to create a custom iconset.
|
|||
See the [iron-icons demo](iron-icons?view=demo:demo/index.html) to see the icons available
|
||||
in the various iconsets.
|
||||
|
||||
To load a subset of icons from one of the default `iron-icons` sets, you can
|
||||
use the [poly-icon](https://poly-icon.appspot.com/) tool. It allows you
|
||||
to select individual icons, and creates an iconset from them that you can
|
||||
use directly in your elements.
|
||||
|
||||
### Styling
|
||||
|
||||
|
@ -138,7 +142,8 @@ Custom property | Description | Default
|
|||
* @type {!Polymer.IronMeta}
|
||||
*/
|
||||
_meta: {
|
||||
value: Polymer.Base.create('iron-meta', {type: 'iconset'})
|
||||
value: Polymer.Base.create('iron-meta', {type: 'iconset'}),
|
||||
observer: '_updateIcon'
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -163,7 +168,14 @@ Custom property | Description | Default
|
|||
/** @suppress {visibility} */
|
||||
_updateIcon: function() {
|
||||
if (this._usesIconset()) {
|
||||
if (this._iconsetName) {
|
||||
if (this._img && this._img.parentNode) {
|
||||
Polymer.dom(this.root).removeChild(this._img);
|
||||
}
|
||||
if (this._iconName === "") {
|
||||
if (this._iconset) {
|
||||
this._iconset.removeIcon(this);
|
||||
}
|
||||
} else if (this._iconsetName && this._meta) {
|
||||
this._iconset = /** @type {?Polymer.Iconset} */ (
|
||||
this._meta.byKey(this._iconsetName));
|
||||
if (this._iconset) {
|
||||
|
@ -174,6 +186,9 @@ Custom property | Description | Default
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (this._iconset) {
|
||||
this._iconset.removeIcon(this);
|
||||
}
|
||||
if (!this._img) {
|
||||
this._img = document.createElement('img');
|
||||
this._img.style.width = '100%';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue