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

Unified Diff: chrome/browser/resources/settings/device_page/display.js

Issue 2427833002: Use md-select instead of paper-dropdown-menu-light in display.html (Closed)
Patch Set: . Created 4 years, 2 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: chrome/browser/resources/settings/device_page/display.js
diff --git a/chrome/browser/resources/settings/device_page/display.js b/chrome/browser/resources/settings/device_page/display.js
index 5b83b075579f10bada5cda397170860ad90c5332..89ca0bcb0da60e91b102b699bb53c12ba57802e0 100644
--- a/chrome/browser/resources/settings/device_page/display.js
+++ b/chrome/browser/resources/settings/device_page/display.js
@@ -154,10 +154,12 @@ Polymer({
if (this.selectedDisplay.modes.length == 0) {
this.maxModeIndex_ = 0;
this.selectedModeIndex_ = 0;
- return;
+ } else {
+ this.maxModeIndex_ = this.selectedDisplay.modes.length - 1;
+ this.selectedModeIndex_ =
+ this.getSelectedModeIndex_(this.selectedDisplay);
}
- this.maxModeIndex_ = this.selectedDisplay.modes.length - 1;
- this.selectedModeIndex_ = this.getSelectedModeIndex_(this.selectedDisplay);
+ this.$.orientation.value = this.selectedDisplay.rotation;
dpapad 2016/10/18 00:14:46 Nit: Since your drodpown is not using dom-repeat,
stevenjb 2016/10/18 00:43:11 Yup. I just finished making this consistent with t
},
/**
@@ -279,12 +281,12 @@ Polymer({
},
/**
- * @param {!{detail: !{selected: string}}} e
+ * @param {!{target: !{value: string}}} e
dpapad 2016/10/18 00:14:46 @param {!Event}
stevenjb 2016/10/18 00:43:11 Acknowledged.
* @private
*/
onSetOrientation_: function(e) {
/** @type {!chrome.system.display.DisplayProperties} */ var properties = {
- rotation: parseInt(e.detail.selected, 10)
+ rotation: parseInt(e.target.value, 10)
dpapad 2016/10/18 00:14:46 Cast to HTMLSelectElement to satisfy the compiler.
stevenjb 2016/10/18 00:43:10 Acknowledged.
};
settings.display.systemDisplayApi.setDisplayProperties(
this.selectedDisplay.id, properties,

Powered by Google App Engine
This is Rietveld 408576698