mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update ffmpeg
This commit is contained in:
parent
bb0287c5f7
commit
f6960f3838
4 changed files with 62 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-selector",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"description": "Manages a set of elements that can be selected",
|
||||
"private": true,
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
|
@ -30,11 +30,11 @@
|
|||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.1.0",
|
||||
"_release": "1.2.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.1.0",
|
||||
"commit": "abd9ee7c29f0aae7b583abfe0af9db7f2555eabf"
|
||||
"tag": "v1.2.0",
|
||||
"commit": "17a94bd1555d3321f4ecefd472f0c470d48e9e94"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-selector",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"description": "Manages a set of elements that can be selected",
|
||||
"private": true,
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
|
|
|
@ -113,6 +113,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
items: {
|
||||
type: Array,
|
||||
readOnly: true,
|
||||
notify: true,
|
||||
value: function() {
|
||||
return [];
|
||||
}
|
||||
|
@ -201,6 +202,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
this.selected = this._indexToValue(index);
|
||||
},
|
||||
|
||||
/**
|
||||
* Force a synchronous update of the `items` property.
|
||||
*
|
||||
* NOTE: Consider listening for the `iron-items-changed` event to respond to
|
||||
* updates to the set of selectable items after updates to the DOM list and
|
||||
* selection state have been made.
|
||||
*
|
||||
* WARNING: If you are using this method, you should probably consider an
|
||||
* alternate approach. Synchronously querying for items is potentially
|
||||
* slow for many use cases. The `items` property will update asynchronously
|
||||
* on its own to reflect selectable items in the DOM.
|
||||
*/
|
||||
forceSynchronousItemUpdate: function() {
|
||||
this._updateItems();
|
||||
},
|
||||
|
||||
get _shouldUpdateSelection() {
|
||||
return this.selected != null;
|
||||
},
|
||||
|
@ -285,18 +302,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
// observe items change under the given node.
|
||||
_observeItems: function(node) {
|
||||
return Polymer.dom(node).observeNodes(function(mutations) {
|
||||
this._updateItems();
|
||||
|
||||
if (this._shouldUpdateSelection) {
|
||||
this._updateSelected();
|
||||
}
|
||||
|
||||
// Let other interested parties know about the change so that
|
||||
// we don't have to recreate mutation observers everywher.
|
||||
this.fire('iron-items-changed', mutations, {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
});
|
||||
|
||||
this._updateItems();
|
||||
|
||||
if (this._shouldUpdateSelection) {
|
||||
this._updateSelected();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -145,7 +145,21 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
assert.equal(selectedEventCounter, 0);
|
||||
});
|
||||
|
||||
test('force synchronous item update', function() {
|
||||
expect(s2.items.length).to.be.equal(5);
|
||||
Polymer.dom(s2).appendChild(document.createElement('div'));
|
||||
expect(s2.items.length).to.be.equal(5);
|
||||
s2.forceSynchronousItemUpdate();
|
||||
expect(s2.items.length).to.be.equal(6);
|
||||
});
|
||||
|
||||
suite('items changing', function() {
|
||||
var s1;
|
||||
|
||||
setup(function() {
|
||||
s1 = fixture('defaults');
|
||||
});
|
||||
|
||||
test('cause iron-items-changed to fire', function(done) {
|
||||
var newItem = document.createElement('div');
|
||||
var changeCount = 0;
|
||||
|
@ -167,6 +181,26 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
}, 1);
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('updates selected item', function(done) {
|
||||
s1.addEventListener('iron-items-changed', function firstListener() {
|
||||
s1.removeEventListener('iron-items-changed', firstListener);
|
||||
var firstElementChild = Polymer.dom(s1).firstElementChild;
|
||||
expect(firstElementChild).to.be.equal(s1.selectedItem);
|
||||
expect(firstElementChild.classList.contains('iron-selected'))
|
||||
.to.be.eql(true);
|
||||
Polymer.dom(s1).removeChild(s1.selectedItem);
|
||||
|
||||
s1.addEventListener('iron-items-changed', function() {
|
||||
firstElementChild = Polymer.dom(s1).firstElementChild;
|
||||
expect(firstElementChild).to.be.equal(s1.selectedItem);
|
||||
expect(firstElementChild.classList.contains('iron-selected'))
|
||||
.to.be.eql(true);
|
||||
done();
|
||||
});
|
||||
});
|
||||
s1.selected = 0;
|
||||
});
|
||||
});
|
||||
|
||||
suite('dynamic selector', function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue