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

Unified Diff: chrome/browser/resources/settings/settings_main/settings_main.js

Issue 2106013002: Move settings-section animations into setting-section, make better (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Transitions
Patch Set: cleanup Created 4 years, 6 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/settings_main/settings_main.js
diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js
index 11cd9dd684eebba61b2ff7ec7ffed466e63f3575..83c72c11d86c0a4aa39875456476312069af1ab3 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.js
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js
@@ -93,15 +93,23 @@ Polymer({
this.showAboutPage_ = newRoute.page == 'about';
- this.showAdvancedToggle_ = !this.showAboutPage_ && !isSubpage;
+ this.showAdvancedToggle_ = !this.showAboutPage_;
- this.showBasicPage_ = this.showAdvancedToggle_ || newRoute.page == 'basic';
+ this.showBasicPage_ = !this.showAboutPage_;
- this.showAdvancedPage_ =
+ this.showAdvancedPage_ = this.showAdvancedPage_ ||
(this.isAdvancedMenuOpen_ && this.showAdvancedToggle_) ||
newRoute.page == 'advanced';
+ },
+
+ subpageExpanded_: function() {
+ this.showBasicPage_ = this.currentRoute.page == 'basic';
+ this.showAdvancedPage_ = !this.showBasicPage_;
+ this.showAdvancedToggle_ = false;
+ },
- this.style.height = isSubpage ? '100%' : '';
+ subpageCollapsing_: function() {
+ this.currentRouteChanged_(this.currentRoute);
},
/** @private */

Powered by Google App Engine
This is Rietveld 408576698