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

Unified Diff: samples-dev/swarm/swarm_ui_lib/touch/InfiniteScroller.dart

Issue 2828603002: Format samples and samples-dev directories. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: samples-dev/swarm/swarm_ui_lib/touch/InfiniteScroller.dart
diff --git a/samples-dev/swarm/swarm_ui_lib/touch/InfiniteScroller.dart b/samples-dev/swarm/swarm_ui_lib/touch/InfiniteScroller.dart
index 4f9ce2b350182072ec2751878b37806a562d00bc..2ab03a631ea52ad76c0f6a0a9b538594b9cbe0a4 100644
--- a/samples-dev/swarm/swarm_ui_lib/touch/InfiniteScroller.dart
+++ b/samples-dev/swarm/swarm_ui_lib/touch/InfiniteScroller.dart
@@ -54,16 +54,15 @@ class InfiniteScroller {
Element _bottomDiv;
Element _bottomLoadingDiv;
- InfiniteScroller(Scroller scroller,
- Function onTopScroll, Function onBottomScroll,
- double offsetTop, [double offsetBottom = null])
+ InfiniteScroller(Scroller scroller, Function onTopScroll,
+ Function onBottomScroll, double offsetTop,
+ [double offsetBottom = null])
: _scroller = scroller,
_onTopScroll = onTopScroll,
_onBottomScroll = onBottomScroll,
_offsetTop = offsetTop,
_offsetBottom = offsetBottom == null ? offsetTop : offsetBottom,
- _lastScrollY = 0.0 {
- }
+ _lastScrollY = 0.0 {}
/**
* Adds the loading divs.
@@ -74,10 +73,11 @@ class InfiniteScroller {
* [bottomLoadingDiv] is the div to show at the bottom when waiting for more
* content to load at the end of the page.
*/
- void addLoadingDivs([Element topDiv = null,
- Element topLoadingDiv = null,
- Element bottomDiv = null,
- Element bottomLoadingDiv = null]) {
+ void addLoadingDivs(
+ [Element topDiv = null,
+ Element topLoadingDiv = null,
+ Element bottomDiv = null,
+ Element bottomLoadingDiv = null]) {
_topDiv = topDiv;
_topLoadingDiv = topLoadingDiv;
_bottomDiv = bottomDiv;
@@ -129,14 +129,16 @@ class InfiniteScroller {
* Register the event listeners.
*/
void _registerEventListeners() {
- _scroller.onScrollerEnd.listen((Event event) { _onScrollEnd(); });
+ _scroller.onScrollerEnd.listen((Event event) {
+ _onScrollEnd();
+ });
}
/**
* Hides one div and shows another.
*/
- void _updateVisibility(bool isLoading, Element element,
- Element loadingElement) {
+ void _updateVisibility(
+ bool isLoading, Element element, Element loadingElement) {
if (element != null) {
element.style.display = isLoading ? "none" : "";
}
« no previous file with comments | « samples-dev/swarm/swarm_ui_lib/touch/Geometry.dart ('k') | samples-dev/swarm/swarm_ui_lib/touch/Momentum.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698