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

Unified Diff: runtime/observatory/lib/src/elements/containers/virtual_collection.dart

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge Created 4 years, 3 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: runtime/observatory/lib/src/elements/containers/virtual_collection.dart
diff --git a/runtime/observatory/lib/src/elements/containers/virtual_collection.dart b/runtime/observatory/lib/src/elements/containers/virtual_collection.dart
index d8d6e1646ae83e365ec9446c362628fd31c84d77..474753942d72635b0036580aa8f675a45418df7b 100644
--- a/runtime/observatory/lib/src/elements/containers/virtual_collection.dart
+++ b/runtime/observatory/lib/src/elements/containers/virtual_collection.dart
@@ -8,12 +8,11 @@ import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
import 'package:observatory/src/elements/helpers/tag.dart';
typedef HtmlElement VirtualCollectionCreateCallback();
-typedef void VirtualCollectionUpdateCallback(HtmlElement el, dynamic item,
- int index);
+typedef void VirtualCollectionUpdateCallback(
+ HtmlElement el, dynamic item, int index);
class VirtualCollectionElement extends HtmlElement implements Renderable {
- static const tag =
- const Tag<VirtualCollectionElement>('virtual-collection');
+ static const tag = const Tag<VirtualCollectionElement>('virtual-collection');
RenderingScheduler<VirtualCollectionElement> _r;
@@ -39,9 +38,9 @@ class VirtualCollectionElement extends HtmlElement implements Renderable {
_r.dirty();
}
-
factory VirtualCollectionElement(VirtualCollectionCreateCallback create,
- VirtualCollectionUpdateCallback update, {Iterable items: const [],
+ VirtualCollectionUpdateCallback update,
+ {Iterable items: const [],
VirtualCollectionCreateCallback createHeader,
RenderingQueue queue}) {
assert(create != null);
@@ -68,7 +67,7 @@ class VirtualCollectionElement extends HtmlElement implements Renderable {
_onResizeSubscription = window.onResize.listen(_onResize);
}
- @override
+ @override
detached() {
super.detached();
_r.disable(notify: true);
@@ -87,7 +86,7 @@ class VirtualCollectionElement extends HtmlElement implements Renderable {
return null;
}
final item_index =
- _top + el_index - (_shifter.children.length * _inverse_preload).floor();
+ _top + el_index - (_shifter.children.length * _inverse_preload).floor();
if (0 <= item_index && item_index < items.length) {
return _items[item_index];
}
@@ -98,6 +97,7 @@ class VirtualCollectionElement extends HtmlElement implements Renderable {
/// 1/preload_size of the number of items in the visble area.
/// See shared.css for the "top:-25%;".
static const int _preload = 2;
+
/// L = length of all the elements loaded
/// l = length of the visible area
///
@@ -119,8 +119,7 @@ class VirtualCollectionElement extends HtmlElement implements Renderable {
children = [
_scroller
..children = [
- _shifter
- ..children = [_create()]
+ _shifter..children = [_create()]
],
];
if (_createHeader != null) {
« no previous file with comments | « runtime/observatory/lib/src/elements/code_view.dart ('k') | runtime/observatory/lib/src/elements/containers/virtual_tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698