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

Unified Diff: samples-dev/swarm/swarm_ui_lib/view/CompositeView.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
« no previous file with comments | « samples-dev/swarm/swarm_ui_lib/util/Uri.dart ('k') | samples-dev/swarm/swarm_ui_lib/view/ConveyorView.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples-dev/swarm/swarm_ui_lib/view/CompositeView.dart
diff --git a/samples-dev/swarm/swarm_ui_lib/view/CompositeView.dart b/samples-dev/swarm/swarm_ui_lib/view/CompositeView.dart
index 016c61d443853f0df9b90cf55c849b8de3ad3e8b..85c3fe697b07a7593d34fdb0cd20ba4f4a42ad57 100644
--- a/samples-dev/swarm/swarm_ui_lib/view/CompositeView.dart
+++ b/samples-dev/swarm/swarm_ui_lib/view/CompositeView.dart
@@ -8,7 +8,6 @@ part of view;
* A View that is composed of child views.
*/
class CompositeView extends View {
-
List<View> childViews;
// TODO(rnystrom): Allowing this to be public is gross. CompositeView should
@@ -25,32 +24,34 @@ class CompositeView extends View {
final bool _nestedContainer;
final bool _showScrollbar;
- CompositeView(String this._cssName, [nestedContainer = false,
- scrollable = false, vertical = false,
- showScrollbar = false])
- : super(),
- _nestedContainer = nestedContainer,
- _scrollable = scrollable,
- _vertical = vertical,
- _showScrollbar = showScrollbar,
- childViews = new List<View>() {
- }
+ CompositeView(String this._cssName,
+ [nestedContainer = false,
+ scrollable = false,
+ vertical = false,
+ showScrollbar = false])
+ : super(),
+ _nestedContainer = nestedContainer,
+ _scrollable = scrollable,
+ _vertical = vertical,
+ _showScrollbar = showScrollbar,
+ childViews = new List<View>() {}
Element render() {
Element node = new Element.html('<div class="$_cssName"></div>');
if (_nestedContainer) {
- container = new Element.html('<div class="scroll-container"></div>');
- node.nodes.add(container);
- } else {
- container = node;
- }
+ container = new Element.html('<div class="scroll-container"></div>');
+ node.nodes.add(container);
+ } else {
+ container = node;
+ }
if (_scrollable) {
- scroller = new Scroller(container,
- _vertical /* verticalScrollEnabled */,
- !_vertical /* horizontalScrollEnabled */,
- true /* momementumEnabled */);
+ scroller = new Scroller(
+ container,
+ _vertical /* verticalScrollEnabled */,
+ !_vertical /* horizontalScrollEnabled */,
+ true /* momementumEnabled */);
if (_showScrollbar) {
_scrollbar = new Scrollbar(scroller);
}
@@ -80,7 +81,9 @@ class CompositeView extends View {
}
void removeChild(View view) {
- childViews = childViews.where((e) { return view != e; }).toList();
+ childViews = childViews.where((e) {
+ return view != e;
+ }).toList();
// TODO(rnystrom): Container shouldn't be null. Remove this check.
if (container != null) {
view.node.remove();
« no previous file with comments | « samples-dev/swarm/swarm_ui_lib/util/Uri.dart ('k') | samples-dev/swarm/swarm_ui_lib/view/ConveyorView.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698