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

Side by Side Diff: client/touch/InfiniteScroller.dart

Issue 8360025: Move the individual property definitions from client/base/Css to CSSStyleDeclaration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/touch/FxUtil.dart ('k') | client/touch/Scrollbar.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « client/touch/FxUtil.dart ('k') | client/touch/Scrollbar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698