| 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();
|
|
|