| OLD | NEW |
| 1 // 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 |
| 2 // 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 |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Adds a listener to the scroller with triggers events | 6 * Adds a listener to the scroller with triggers events |
| 7 * 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. |
| 8 * | 8 * |
| 9 * 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 |
| 10 * 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 void _registerEventListeners() { | 129 void _registerEventListeners() { |
| 130 _scroller.onScrollerEnd.add((Event event) { _onScrollEnd(); }); | 130 _scroller.onScrollerEnd.add((Event event) { _onScrollEnd(); }); |
| 131 } | 131 } |
| 132 | 132 |
| 133 /** | 133 /** |
| 134 * Hides one div and shows another. | 134 * Hides one div and shows another. |
| 135 */ | 135 */ |
| 136 void _updateVisibility(bool isLoading, Element element, | 136 void _updateVisibility(bool isLoading, Element element, |
| 137 Element loadingElement) { | 137 Element loadingElement) { |
| 138 if (element != null) { | 138 if (element != null) { |
| 139 Css.setDisplay(element.style, isLoading ? "none" : ""); | 139 element.style.display = isLoading ? "none" : ""; |
| 140 } | 140 } |
| 141 if (loadingElement != null) { | 141 if (loadingElement != null) { |
| 142 Css.setDisplay(loadingElement.style, isLoading ? "" : "none"); | 142 loadingElement.style.display = isLoading ? "" : "none"; |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 } | 145 } |
| OLD | NEW |