@@ -58,7 +58,7 @@ return /******/ (function(modules) { // webpackBootstrap
58
58
59
59
var _bscroll = __webpack_require__ ( 1 ) ;
60
60
61
- _bscroll . BScroll . Version = ( "0.1.11 " ) ;
61
+ _bscroll . BScroll . Version = ( "0.1.12 " ) ;
62
62
63
63
module . exports = _bscroll . BScroll ;
64
64
@@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap
91
91
function BScroll ( el , options ) {
92
92
_classCallCheck ( this , BScroll ) ;
93
93
94
- var _this = _possibleConstructorReturn ( this , Object . getPrototypeOf ( BScroll ) . call ( this ) ) ;
94
+ var _this = _possibleConstructorReturn ( this , ( BScroll . __proto__ || Object . getPrototypeOf ( BScroll ) ) . call ( this ) ) ;
95
95
96
96
_this . wrapper = typeof el === 'string' ? document . querySelector ( el ) : el ;
97
97
_this . scroller = _this . wrapper . children [ 0 ] ;
@@ -718,7 +718,7 @@ return /******/ (function(modules) { // webpackBootstrap
718
718
value : function _transitionTime ( ) {
719
719
var _this4 = this ;
720
720
721
- var time = arguments . length <= 0 || arguments [ 0 ] === undefined ? 0 : arguments [ 0 ] ;
721
+ var time = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : 0 ;
722
722
723
723
this . scrollerStyle [ _util . style . transitionDuration ] = time + 'ms' ;
724
724
@@ -844,8 +844,8 @@ return /******/ (function(modules) { // webpackBootstrap
844
844
} , {
845
845
key : 'resetPosition' ,
846
846
value : function resetPosition ( ) {
847
- var time = arguments . length <= 0 || arguments [ 0 ] === undefined ? 0 : arguments [ 0 ] ;
848
- var easeing = arguments . length <= 1 || arguments [ 1 ] === undefined ? _util . ease . bounce : arguments [ 1 ] ;
847
+ var time = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : 0 ;
848
+ var easeing = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : _util . ease . bounce ;
849
849
850
850
var x = this . x ;
851
851
if ( ! this . hasHorizontalScroll || x > 0 ) {
@@ -880,8 +880,8 @@ return /******/ (function(modules) { // webpackBootstrap
880
880
} , {
881
881
key : 'scrollBy' ,
882
882
value : function scrollBy ( x , y ) {
883
- var time = arguments . length <= 2 || arguments [ 2 ] === undefined ? 0 : arguments [ 2 ] ;
884
- var easing = arguments . length <= 3 || arguments [ 3 ] === undefined ? _util . ease . bounce : arguments [ 3 ] ;
883
+ var time = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : 0 ;
884
+ var easing = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : _util . ease . bounce ;
885
885
886
886
x = this . x + x ;
887
887
y = this . y + y ;
@@ -891,7 +891,7 @@ return /******/ (function(modules) { // webpackBootstrap
891
891
} , {
892
892
key : 'scrollTo' ,
893
893
value : function scrollTo ( x , y , time ) {
894
- var easing = arguments . length <= 3 || arguments [ 3 ] === undefined ? _util . ease . bounce : arguments [ 3 ] ;
894
+ var easing = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : _util . ease . bounce ;
895
895
896
896
this . isInTransition = this . options . useTransition && time > 0 && ( x !== this . x || y !== this . y ) ;
897
897
@@ -985,7 +985,7 @@ return /******/ (function(modules) { // webpackBootstrap
985
985
} , {
986
986
key : 'goToPage' ,
987
987
value : function goToPage ( x , y , time ) {
988
- var easing = arguments . length <= 3 || arguments [ 3 ] === undefined ? _util . ease . bounce : arguments [ 3 ] ;
988
+ var easing = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : _util . ease . bounce ;
989
989
990
990
if ( x >= this . pages . length ) {
991
991
x = this . pages . length - 1 ;
@@ -1223,7 +1223,7 @@ return /******/ (function(modules) { // webpackBootstrap
1223
1223
}
1224
1224
1225
1225
function addEvent ( el , type , fn , capture ) {
1226
- el . addEventListener ( type , fn , ! ! capture ) ;
1226
+ el . addEventListener ( type , fn , { passive : false , capture : ! ! capture } ) ;
1227
1227
} ;
1228
1228
1229
1229
function removeEvent ( el , type , fn , capture ) {
@@ -1404,7 +1404,7 @@ return /******/ (function(modules) { // webpackBootstrap
1404
1404
_createClass ( EventEmitter , [ {
1405
1405
key : "on" ,
1406
1406
value : function on ( type , fn ) {
1407
- var context = arguments . length <= 2 || arguments [ 2 ] === undefined ? this : arguments [ 2 ] ;
1407
+ var context = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : this ;
1408
1408
1409
1409
if ( ! this . _events [ type ] ) {
1410
1410
this . _events [ type ] = [ ] ;
@@ -1415,7 +1415,7 @@ return /******/ (function(modules) { // webpackBootstrap
1415
1415
} , {
1416
1416
key : "once" ,
1417
1417
value : function once ( type , fn ) {
1418
- var context = arguments . length <= 2 || arguments [ 2 ] === undefined ? this : arguments [ 2 ] ;
1418
+ var context = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : this ;
1419
1419
1420
1420
var fired = false ;
1421
1421
@@ -1458,10 +1458,9 @@ return /******/ (function(modules) { // webpackBootstrap
1458
1458
for ( var i = 0 ; i < len ; i ++ ) {
1459
1459
var event = eventsCopy [ i ] ;
1460
1460
1461
- var _event = _slicedToArray ( event , 2 ) ;
1462
-
1463
- var fn = _event [ 0 ] ;
1464
- var context = _event [ 1 ] ;
1461
+ var _event = _slicedToArray ( event , 2 ) ,
1462
+ fn = _event [ 0 ] ,
1463
+ context = _event [ 1 ] ;
1465
1464
1466
1465
if ( fn ) {
1467
1466
fn . apply ( context , [ ] . slice . call ( arguments , 1 ) ) ;
@@ -1487,10 +1486,10 @@ return /******/ (function(modules) { // webpackBootstrap
1487
1486
var distance = current - start ;
1488
1487
var speed = Math . abs ( distance ) / time ;
1489
1488
1490
- var deceleration = options . deceleration ;
1491
- var itemHeight = options . itemHeight ;
1492
- var swipeBounceTime = options . swipeBounceTime ;
1493
- var bounceTime = options . bounceTime ;
1489
+ var deceleration = options . deceleration ,
1490
+ itemHeight = options . itemHeight ,
1491
+ swipeBounceTime = options . swipeBounceTime ,
1492
+ bounceTime = options . bounceTime ;
1494
1493
1495
1494
var duration = options . swipeTime ;
1496
1495
var rate = options . wheel ? 4 : 15 ;
0 commit comments