| Index: samples/swarm/swarm_ui_lib/touch/Scroller.dart
|
| diff --git a/samples/swarm/swarm_ui_lib/touch/Scroller.dart b/samples/swarm/swarm_ui_lib/touch/Scroller.dart
|
| index df049a27dac8374e08107829c6999870ef0eb6e7..d3e41f615be8866294703b75a8096cb1fd8e9467 100644
|
| --- a/samples/swarm/swarm_ui_lib/touch/Scroller.dart
|
| +++ b/samples/swarm/swarm_ui_lib/touch/Scroller.dart
|
| @@ -144,7 +144,7 @@ class Scroller implements Draggable, MomentumDelegate {
|
| _lookupContentSizeDelegate = lookupContentSizeDelegate,
|
| _element = scrollableElem,
|
| _frame = scrollableElem.parent,
|
| - _scrollTechnique = scrollTechnique !== null
|
| + _scrollTechnique = scrollTechnique != null
|
| ? scrollTechnique : ScrollerScrollTechnique.TRANSFORM_3D,
|
| _minPoint = new Coordinate(0, 0),
|
| _maxPoint = new Coordinate(0, 0),
|
| @@ -240,35 +240,35 @@ class Scroller implements Draggable, MomentumDelegate {
|
| }
|
|
|
| EventListenerList get onScrollerStart {
|
| - if (_onScrollerStart === null) {
|
| + if (_onScrollerStart == null) {
|
| _onScrollerStart = new SimpleEventListenerList();
|
| }
|
| return _onScrollerStart;
|
| }
|
|
|
| EventListenerList get onScrollerEnd {
|
| - if (_onScrollerEnd === null) {
|
| + if (_onScrollerEnd == null) {
|
| _onScrollerEnd = new SimpleEventListenerList();
|
| }
|
| return _onScrollerEnd;
|
| }
|
|
|
| EventListenerList get onScrollerDragEnd {
|
| - if (_onScrollerDragEnd === null) {
|
| + if (_onScrollerDragEnd == null) {
|
| _onScrollerDragEnd = new SimpleEventListenerList();
|
| }
|
| return _onScrollerDragEnd;
|
| }
|
|
|
| EventListenerList get onContentMoved {
|
| - if (_onContentMoved === null) {
|
| + if (_onContentMoved == null) {
|
| _onContentMoved = new SimpleEventListenerList();
|
| }
|
| return _onContentMoved;
|
| }
|
|
|
| EventListenerList get onDecelStart {
|
| - if (_onDecelStart === null) {
|
| + if (_onDecelStart == null) {
|
| _onDecelStart = new SimpleEventListenerList();
|
| }
|
| return _onDecelStart;
|
| @@ -280,7 +280,7 @@ class Scroller implements Draggable, MomentumDelegate {
|
| * notifications from this scroller.
|
| */
|
| void addScrollListener(ScrollListener listener) {
|
| - if (_scrollWatcher === null) {
|
| + if (_scrollWatcher == null) {
|
| _scrollWatcher = new ScrollWatcher(this);
|
| _scrollWatcher.initialize();
|
| }
|
| @@ -310,7 +310,7 @@ class Scroller implements Draggable, MomentumDelegate {
|
| */
|
| Coordinate get currentTarget {
|
| Coordinate end = _momentum.destination;
|
| - if (end === null) {
|
| + if (end == null) {
|
| end = _contentOffset;
|
| }
|
| return end;
|
| @@ -392,7 +392,7 @@ class Scroller implements Draggable, MomentumDelegate {
|
| * Returns the percent of the page scrolled horizontally.
|
| */
|
| num getHorizontalScrollPercent([num x = null]) {
|
| - x = x !== null ? x : _contentOffset.x;
|
| + x = x != null ? x : _contentOffset.x;
|
| return (x - _minPoint.x) / (_maxPoint.x - _minPoint.x);
|
| }
|
|
|
| @@ -412,7 +412,7 @@ class Scroller implements Draggable, MomentumDelegate {
|
| * none is provided then the content's current y offset will be used.
|
| */
|
| num getVerticalScrollPercent([num y = null]) {
|
| - y = y !== null ? y : _contentOffset.y;
|
| + y = y != null ? y : _contentOffset.y;
|
| return (y - _minPoint.y) / Math.max(1, _maxPoint.y - _minPoint.y);
|
| }
|
|
|
| @@ -542,7 +542,7 @@ class Scroller implements Draggable, MomentumDelegate {
|
| */
|
| void _resize(Callback callback) {
|
| window.requestLayoutFrame(() {
|
| - if (_lookupContentSizeDelegate !== null) {
|
| + if (_lookupContentSizeDelegate != null) {
|
| _contentSize = _lookupContentSizeDelegate();
|
| } else {
|
| _contentSize = new Size(_element.scrollWidth, _element.scrollHeight);
|
|
|