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

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

Issue 1736733003: MD Settings: Custom expand/collapse section animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: function/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: 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 0b46de37c6d9e13293e86a480d3fa8b31ad9fb04..766e9dde50ec1c8e6f46a3fbd3ea6432ba341fd8 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.js
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js
@@ -43,35 +43,8 @@ Polymer({
}
},
- listeners: {
- 'expand-animation-complete': 'onExpandAnimationComplete_',
- },
-
/** @private */
currentRouteChanged_: function(newRoute, oldRoute) {
this.showAdvancedPage_ = newRoute.page == 'advanced';
-
- var pageContainer = this.$.pageContainer;
- if (!oldRoute) {
- pageContainer.classList.toggle('expanded', newRoute.section);
- return;
- }
-
- // For contraction only, apply new styling immediately.
- if (!newRoute.section && oldRoute.section) {
- pageContainer.classList.remove('expanded');
-
- // TODO(tommycli): Save and restore scroll position. crbug.com/537359.
- pageContainer.scrollTop = 0;
- }
- },
-
- /** @private */
- onExpandAnimationComplete_: function() {
- if (this.currentRoute.section) {
- var pageContainer = this.$.pageContainer;
- pageContainer.classList.add('expanded');
- pageContainer.scrollTop = 0;
- }
},
});
« no previous file with comments | « chrome/browser/resources/settings/settings_main/settings_main.css ('k') | chrome/browser/resources/settings/settings_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698