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

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: Created 4 years, 10 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 f683d4799e3225d8187111afb22def23eb0f3574..1897aca9a39f3009b97dd8246327014bf8042fb3 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.js
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js
@@ -46,35 +46,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;
- }
},
});

Powered by Google App Engine
This is Rietveld 408576698