OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-ui' implements the UI for the Settings page. | 7 * 'settings-ui' implements the UI for the Settings page. |
8 * | 8 * |
9 * Example: | 9 * Example: |
10 * | 10 * |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 }, | 106 }, |
107 </if> | 107 </if> |
108 }; | 108 }; |
109 } | 109 } |
110 }, | 110 }, |
111 | 111 |
112 /** @override */ | 112 /** @override */ |
113 attached: function() { | 113 attached: function() { |
114 // Preload bold Roboto so it doesn't load and flicker the first time used. | 114 // Preload bold Roboto so it doesn't load and flicker the first time used. |
115 document.fonts.load('bold 12px Roboto'); | 115 document.fonts.load('bold 12px Roboto'); |
| 116 settings.setGlobalScrollTarget(this.$.headerPanel.scroller); |
116 }, | 117 }, |
117 | 118 |
118 /** | 119 /** |
119 * @param {Event} event | 120 * @param {Event} event |
120 * @private | 121 * @private |
121 */ | 122 */ |
122 onIronActivate_: function(event) { | 123 onIronActivate_: function(event) { |
123 if (event.detail.item.id != 'advancedPage') | 124 if (event.detail.item.id != 'advancedPage') |
124 this.$$('app-drawer').close(); | 125 this.$$('app-drawer').close(); |
125 }, | 126 }, |
126 | 127 |
127 /** @private */ | 128 /** @private */ |
128 onMenuButtonTap_: function() { | 129 onMenuButtonTap_: function() { |
129 this.$$('app-drawer').toggle(); | 130 this.$$('app-drawer').toggle(); |
130 }, | 131 }, |
131 | 132 |
132 /** @private */ | 133 /** @private */ |
133 directionDelegateChanged_: function() { | 134 directionDelegateChanged_: function() { |
134 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? | 135 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? |
135 'right' : 'left'; | 136 'right' : 'left'; |
136 }, | 137 }, |
137 }); | 138 }); |
OLD | NEW |