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

update polymer components

This commit is contained in:
Luke Pulverenti 2015-11-18 21:36:19 -05:00
parent aa272fb404
commit 8fe136f23c
17 changed files with 183 additions and 180 deletions

View file

@ -461,21 +461,6 @@ This element is `display:block` by default, but you can set the `inline` attribu
} else {
this._handleValue(this._inputElement);
}
this._numberOfPrefixNodes = 0;
this._prefixObserver = Polymer.dom(this.$.prefix).observeNodes(
function(mutations) {
// Keep track whether there's at least one prefix node, since it
// affects laying out the floating label.
this._numberOfPrefixNodes += mutations.addedNodes.length -
mutations.removedNodes.length;
}.bind(this));
},
detached: function() {
if (this._prefixObserver) {
Polymer.dom(this.$.prefix).unobserveNodes(this._prefixObserver);
}
},
_onAddonAttached: function(event) {
@ -567,16 +552,15 @@ This element is `display:block` by default, but you can set the `inline` attribu
if (alwaysFloatLabel || _inputHasContent) {
cls += ' label-is-floating';
// If the label is floating, ignore any offsets that may have been
// applied from a prefix element.
this.$.labelAndInputContainer.style.position = 'static';
if (invalid) {
cls += ' is-invalid';
} else if (focused) {
cls += " label-is-highlighted";
}
// If a prefix element exists, the label has a horizontal offset
// which needs to be undone when displayed as a floating label.
if (this._numberOfPrefixNodes > 0) {
this.$.labelAndInputContainer.style.position = 'static';
}
} else {
// When the label is not floating, it should overlap the input element.
if (label) {