|
39 | 39 | *
|
40 | 40 | * @copyright The Financial Times Ltd [All rights reserved]
|
41 | 41 | * @codingstandard ftlabs-jslint
|
42 |
| - * @version 0.6.2 |
| 42 | + * @version 0.7.0 |
43 | 43 | */
|
44 | 44 | /**
|
45 | 45 | * @license FTScroller is (c) 2012 The Financial Times Ltd [All rights reserved] and licensed under the MIT license.
|
@@ -733,15 +733,6 @@ var FTScroller, CubicBezier;
|
733 | 733 | y: inputY - _gestureStart.y
|
734 | 734 | };
|
735 | 735 |
|
736 |
| - // if only one axis scroll is used, bubble up the other scroll wheel event |
737 |
| - // e.g. if only x axis scroll is used then scrolling y axis can bubble up to scroll the page |
738 |
| - if(!_instanceOptions.invertScrollWheel && ( |
739 |
| - (_instanceOptions.scrollingX && !_instanceOptions.scrollingY && Math.abs(gesture.x) < Math.abs(gesture.y)) || |
740 |
| - (!_instanceOptions.scrollingX && _instanceOptions.scrollingY && Math.abs(gesture.x) > Math.abs(gesture.y)) |
741 |
| - )) { |
742 |
| - return; |
743 |
| - } |
744 |
| - |
745 | 736 | // Opera fix
|
746 | 737 | if (inputTime <= 0) {
|
747 | 738 | inputTime = Date.now();
|
@@ -785,18 +776,18 @@ var FTScroller, CubicBezier;
|
785 | 776 | // Determine scroll distance beyond bounds
|
786 | 777 | distancesBeyondBounds = _distancesBeyondBounds(_targetScrollPosition);
|
787 | 778 |
|
788 |
| - // Determine whether to prevent the default scroll event - if the scroll could still |
789 |
| - // be triggered, prevent the default to avoid problems (particularly on PlayBook) |
790 |
| - if (_instanceOptions.bouncing || scrollInterrupt || (_scrollableAxes.x && gesture.x && distancesBeyondBounds.x < 0) || (_scrollableAxes.y && gesture.y && distancesBeyondBounds.y < 0)) { |
791 |
| - rawEvent.preventDefault(); |
792 |
| - } |
793 |
| - |
794 | 779 | // Check scrolled distance against the boundary limit to see if scrolling can be triggered.
|
795 | 780 | // If the scroll has been interrupted, trigger at once
|
796 | 781 | if (!scrollInterrupt && (!_scrollableAxes.x || Math.abs(gesture.x) < _instanceOptions.scrollResponseBoundary) && (!_scrollableAxes.y || Math.abs(gesture.y) < _instanceOptions.scrollResponseBoundary)) {
|
797 | 782 | return;
|
798 | 783 | }
|
799 | 784 |
|
| 785 | + // Determine whether to prevent the default scroll event - if the scroll could still |
| 786 | + // be triggered, prevent the default to avoid problems (particularly on PlayBook) |
| 787 | + if (_instanceOptions.bouncing || scrollInterrupt || (_scrollableAxes.x && gesture.x && distancesBeyondBounds.x < 0) || (_scrollableAxes.y && gesture.y && distancesBeyondBounds.y < 0)) { |
| 788 | + rawEvent.preventDefault(); |
| 789 | + } |
| 790 | + |
800 | 791 | // If bouncing is disabled, and already at an edge and scrolling beyond the edge, ignore the scroll for
|
801 | 792 | // now - this allows other scrollers to claim if appropriate, allowing nicer nested scrolls.
|
802 | 793 | if (!_instanceOptions.bouncing && !scrollInterrupt && (!_scrollableAxes.x || !gesture.x || distancesBeyondBounds.x > 0) && (!_scrollableAxes.y || !gesture.y || distancesBeyondBounds.y > 0)) {
|
|
0 commit comments