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

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: big rebase 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 f9afe10053f9bbe4649a97a3c3b9115cdebe440d..9ad85884ea37a0894ecc26d006db7addd58e328b 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.js
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js
@@ -109,15 +109,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';
Dan Beam 2016/07/07 18:15:38 should all of these be computed separtely with the
michaelpg 2016/07/08 00:19:02 Done, great suggestion!
+ },
+
Dan Beam 2016/07/07 18:15:38 /** @private */
michaelpg 2016/07/08 00:19:02 Done.
+ 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