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

Unified Diff: samples-dev/swarm/swarm_ui_lib/touch/ClickBuster.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/ClickBuster.dart
diff --git a/samples-dev/swarm/swarm_ui_lib/touch/ClickBuster.dart b/samples-dev/swarm/swarm_ui_lib/touch/ClickBuster.dart
index 8aa776fec8e2e185b7b00879f2135812eaee16be..33d8495437714c71a90f59a4bcb1a3d9cc8169cc 100644
--- a/samples-dev/swarm/swarm_ui_lib/touch/ClickBuster.dart
+++ b/samples-dev/swarm/swarm_ui_lib/touch/ClickBuster.dart
@@ -69,10 +69,8 @@ class ClickBuster {
*/
DoubleLinkedQueueEntry<num> entry = _coordinates.firstEntry();
while (entry != null) {
- if (_hitTest(entry.element,
- entry.nextEntry().element,
- coord.x,
- coord.y)) {
+ if (_hitTest(
+ entry.element, entry.nextEntry().element, coord.x, coord.y)) {
entry.nextEntry().remove();
entry.remove();
return;
@@ -96,9 +94,9 @@ class ClickBuster {
final coord = new Coordinate.fromClient(te.touches[0]);
_coordinates.add(coord.x);
_coordinates.add(coord.y);
- new Timer(
- const Duration(milliseconds: _TIME_THRESHOLD),
- () { _removeCoordinate(coord.x, coord.y); });
+ new Timer(const Duration(milliseconds: _TIME_THRESHOLD), () {
+ _removeCoordinate(coord.x, coord.y);
+ });
_toggleTapHighlights(true);
}
@@ -180,27 +178,29 @@ class ClickBuster {
if (_coordinates == null) {
// Listen to clicks on capture phase so they can be busted before anything
// else gets a chance to handle them.
- Element.clickEvent.forTarget(document, useCapture: true).listen(
- (e) { _onClick(e); });
- Element.focusEvent.forTarget(document, useCapture: true).listen(
- (e) { _lastPreventedTime = 0; });
+ Element.clickEvent.forTarget(document, useCapture: true).listen((e) {
+ _onClick(e);
+ });
+ Element.focusEvent.forTarget(document, useCapture: true).listen((e) {
+ _lastPreventedTime = 0;
+ });
// Listen to touchstart on capture phase since it must be called prior to
// every click or else we will accidentally prevent the click even if we
// don't call preventGhostClick.
- Function startFn = (e) { _onTouchStart(e); };
+ Function startFn = (e) {
+ _onTouchStart(e);
+ };
if (!Device.supportsTouch) {
startFn = mouseToTouchCallback(startFn);
}
var stream;
if (Device.supportsTouch) {
- stream = Element.touchStartEvent.forTarget(document, useCapture:true);
+ stream = Element.touchStartEvent.forTarget(document, useCapture: true);
} else {
- stream = Element.mouseDownEvent.forTarget(document, useCapture:true);
+ stream = Element.mouseDownEvent.forTarget(document, useCapture: true);
}
- EventUtil.observe(document,
- stream,
- startFn, true);
+ EventUtil.observe(document, stream, startFn, true);
_coordinates = new DoubleLinkedQueue<num>();
}
« no previous file with comments | « samples-dev/swarm/swarm_ui_lib/touch/BezierPhysics.dart ('k') | samples-dev/swarm/swarm_ui_lib/touch/EventUtil.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698