Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js

Issue 1766433002: Roll Polymer to 1.3.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
index e33d87685d85a95889c7cf7d5598451708ae52ab..291e7de4c4758e36029e74eda4d0d0c39eabbc7e 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js
@@ -122,7 +122,8 @@
},
observers: [
- '_updateSelected(attrForSelected, selected)'
+ '_updateAttrForSelected(attrForSelected)',
+ '_updateSelected(selected)'
],
created: function() {
@@ -134,7 +135,7 @@
this._observer = this._observeItems(this);
this._updateItems();
if (!this._shouldUpdateSelection) {
- this._updateSelected(this.attrForSelected,this.selected)
+ this._updateSelected();
}
this._addListener(this.activateEvent);
},
@@ -227,6 +228,12 @@
this._setItems(nodes);
},
+ _updateAttrForSelected: function() {
+ if (this._shouldUpdateSelection) {
+ this.selected = this._indexToValue(this.indexOf(this.selectedItem));
+ }
+ },
+
_updateSelected: function() {
this._selectSelected(this.selected);
},
@@ -296,7 +303,7 @@
}
// Let other interested parties know about the change so that
- // we don't have to recreate mutation observers everywher.
+ // we don't have to recreate mutation observers everywhere.
this.fire('iron-items-changed', mutations, {
bubbles: false,
cancelable: false

Powered by Google App Engine
This is Rietveld 408576698