Chromium Code Reviews| Index: samples/swarm/swarm_ui_lib/touch/TouchHandler.dart |
| diff --git a/samples/swarm/swarm_ui_lib/touch/TouchHandler.dart b/samples/swarm/swarm_ui_lib/touch/TouchHandler.dart |
| index 389aec7c05095327d6de9aedef65d71ec879b71b..c1ce2364dd2ec6c30b02946cfd8deeeea40bb2b8 100644 |
| --- a/samples/swarm/swarm_ui_lib/touch/TouchHandler.dart |
| +++ b/samples/swarm/swarm_ui_lib/touch/TouchHandler.dart |
| @@ -233,7 +233,7 @@ class TouchHandler { |
| void _onEnd(int timeStamp, [TouchEvent e = null]) { |
| _touching = false; |
| _touchable.onTouchEnd(); |
| - if (!_tracking || _draggable === null) { |
| + if (!_tracking || _draggable == null) { |
| return; |
| } |
| Touch touch = _getLastTouch(); |
| @@ -246,7 +246,7 @@ class TouchHandler { |
| _recentTouchesX = _removeOldTouches(_recentTouchesX, timeStamp); |
| _recentTouchesY = _removeOldTouches(_recentTouchesY, timeStamp); |
| _draggable.onDragEnd(); |
| - if (e !== null) { |
| + if (e != null) { |
| e.preventDefault(); |
| } |
| ClickBuster.preventGhostClick(_startTouchX, _startTouchY); |
| @@ -258,7 +258,7 @@ class TouchHandler { |
| * Touch move handler. |
| */ |
| void _onMove(TouchEvent e) { |
| - if (!_tracking || _draggable === null) { |
| + if (!_tracking || _draggable == null) { |
| return; |
| } |
| final touch = e.touches[0]; |
| @@ -310,7 +310,7 @@ class TouchHandler { |
| return; |
| } |
| _touching = true; |
| - if (!_touchable.onTouchStart(e) || _draggable === null) { |
| + if (!_touchable.onTouchStart(e) || _draggable == null) { |
| return; |
| } |
| final touch = e.touches[0]; |
| @@ -370,9 +370,7 @@ class TouchHandler { |
| } |
| // TODO(jacobr): why doesn't bool implement the xor operator directly? |
| - static bool _xor(bool a, bool b) { |
| - return (a === true || b === true) && !(a === true && b === true); |
| - } |
| + static bool _xor(bool a, bool b) => a != b; |
|
Lasse Reichstein Nielsen
2012/11/12 13:10:41
Are we sure this isn't an attempt to do boolify on
floitsch
2012/11/12 22:18:43
Afaics the only use is in line 366. Not inlining,
|
| /** |
| * Reset the touchable element. |