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 Polymer({ | 5 Polymer({ |
6 is: 'history-list', | 6 is: 'history-list', |
7 | 7 |
8 behaviors: [HistoryListBehavior], | 8 behaviors: [HistoryListBehavior], |
9 | 9 |
10 properties: { | 10 properties: { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 */ | 146 */ |
147 isCardEnd_: function(item, i, length) { | 147 isCardEnd_: function(item, i, length) { |
148 if (length == 0 || i > length - 1) | 148 if (length == 0 || i > length - 1) |
149 return false; | 149 return false; |
150 return i == length - 1 || | 150 return i == length - 1 || |
151 this.historyData_[i].dateRelativeDay != | 151 this.historyData_[i].dateRelativeDay != |
152 this.historyData_[i + 1].dateRelativeDay; | 152 this.historyData_[i + 1].dateRelativeDay; |
153 }, | 153 }, |
154 | 154 |
155 /** | 155 /** |
156 * @param {number} index | |
157 * @return {boolean} | |
158 * @private | |
159 */ | |
160 isFirstItem_: function(index) { | |
161 return index == 0; | |
162 }, | |
163 | |
164 /** | |
165 * @private | 156 * @private |
166 */ | 157 */ |
167 notifyListScroll_: function() { | 158 notifyListScroll_: function() { |
168 this.fire('history-list-scrolled'); | 159 this.fire('history-list-scrolled'); |
169 }, | 160 }, |
170 | 161 |
171 /** | 162 /** |
172 * @param {number} index | 163 * @param {number} index |
173 * @return {string} | 164 * @return {string} |
174 * @private | 165 * @private |
175 */ | 166 */ |
176 pathForItem_: function(index) { | 167 pathForItem_: function(index) { |
177 return 'historyData_.' + index; | 168 return 'historyData_.' + index; |
178 }, | 169 }, |
179 }); | 170 }); |
OLD | NEW |