OLD | NEW |
1 part of touch; | |
2 | |
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 /** | 5 /** |
8 * Adds a listener to the scroller with triggers events | 6 * Adds a listener to the scroller with triggers events |
9 * when a trigger point at the top, or bottom, of the screen is reached. | 7 * when a trigger point at the top, or bottom, of the screen is reached. |
10 * | 8 * |
11 * To use this you will need to have an element with a scroller attached | 9 * To use this you will need to have an element with a scroller attached |
12 * to it. You need to have defined (in pixels) how far from the top or | 10 * to it. You need to have defined (in pixels) how far from the top or |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 void _updateVisibility(bool isLoading, Element element, | 136 void _updateVisibility(bool isLoading, Element element, |
139 Element loadingElement) { | 137 Element loadingElement) { |
140 if (element != null) { | 138 if (element != null) { |
141 element.style.display = isLoading ? "none" : ""; | 139 element.style.display = isLoading ? "none" : ""; |
142 } | 140 } |
143 if (loadingElement != null) { | 141 if (loadingElement != null) { |
144 loadingElement.style.display = isLoading ? "" : "none"; | 142 loadingElement.style.display = isLoading ? "" : "none"; |
145 } | 143 } |
146 } | 144 } |
147 } | 145 } |
OLD | NEW |