@@ -100,6 +100,7 @@ const fotoramaVersion = '4.6.4';
100
100
function ( v ) {
101
101
return parseInt ( v , 10 ) ;
102
102
} ) ,
103
+ //eslint-disable-next-line no-unused-vars
103
104
_ = { } ,
104
105
Modernizr ;
105
106
@@ -500,6 +501,7 @@ const fotoramaVersion = '4.6.4';
500
501
return C [ 0 ] + t * ( 2 * B [ 0 ] + 3 * A [ 0 ] * t ) ;
501
502
} ,
502
503
xForT = function ( t ) {
504
+ // eslint-disable-next-line no-shadow
503
505
var x = t , i = 0 , z ;
504
506
505
507
while ( ++ i < 14 ) {
@@ -810,7 +812,7 @@ const fotoramaVersion = '4.6.4';
810
812
function getNumber ( ) {
811
813
var number ;
812
814
813
- for ( var _i = 0 , _l = arguments . length ; _i < _l ; _i ++ ) {
815
+ for ( let _i = 0 , _l = arguments . length ; _i < _l ; _i ++ ) {
814
816
number = _i ? arguments [ _i ] ( ) : arguments [ _i ] ;
815
817
if ( typeof number === 'number' ) {
816
818
break ;
@@ -893,6 +895,7 @@ const fotoramaVersion = '4.6.4';
893
895
return id ? { id : id , type : type , s : href . search . replace ( / ^ \? / , '' ) , p : getProtocol ( ) } : false ;
894
896
}
895
897
898
+ // eslint-disable-next-line no-shadow
896
899
function updateData ( data , _dataFrame , i , fotorama ) {
897
900
for ( let _i = 0 , _l = data . length ; _i < _l ; _i ++ ) {
898
901
let dataFrame = data [ _i ] ;
@@ -974,7 +977,7 @@ const fotoramaVersion = '4.6.4';
974
977
975
978
function optionsToLowerCase ( options ) {
976
979
if ( options ) {
977
- var opts = { } ;
980
+ let opts = { } ;
978
981
979
982
$ . each ( options , function ( key , value ) {
980
983
opts [ key . toLowerCase ( ) ] = value ;
@@ -1035,6 +1038,7 @@ const fotoramaVersion = '4.6.4';
1035
1038
return ! $ . contains ( document . documentElement , el ) ;
1036
1039
}
1037
1040
1041
+ // eslint-disable-next-line no-shadow
1038
1042
function waitFor ( test , fn , timeout , i ) {
1039
1043
if ( ! waitFor . i ) {
1040
1044
waitFor . i = 1 ;
@@ -1058,6 +1062,7 @@ const fotoramaVersion = '4.6.4';
1058
1062
return waitFor . i ++ ;
1059
1063
}
1060
1064
1065
+ // eslint-disable-next-line no-shadow
1061
1066
waitFor . stop = function ( i ) {
1062
1067
waitFor . ii [ i ] = false ;
1063
1068
} ;
@@ -1170,6 +1175,7 @@ const fotoramaVersion = '4.6.4';
1170
1175
1171
1176
while ( l ) {
1172
1177
// Pick a remaining element
1178
+ // eslint-disable-next-line no-shadow
1173
1179
let i = Math . floor ( Math . random ( ) * l -- ) ,
1174
1180
1175
1181
// And swap it with the current element
@@ -1336,6 +1342,7 @@ const fotoramaVersion = '4.6.4';
1336
1342
* @param isExpected {bool} if items with caption need render them or not
1337
1343
* @returns {boolean } if true then caption should be rendered
1338
1344
*/
1345
+ //eslint-disable-next-line
1339
1346
function isExpectedCaption ( frameItem , isExpected , undefined ) {
1340
1347
var expected = false ,
1341
1348
frameExpected ;
@@ -1360,6 +1367,7 @@ const fotoramaVersion = '4.6.4';
1360
1367
isExpectedCaption : isExpectedCaption
1361
1368
} ;
1362
1369
1370
+ // eslint-disable-next-line no-use-before-define
1363
1371
} ( UTIL || { } , jQuery ) ) ;
1364
1372
1365
1373
function slide ( $el , options ) {
@@ -1861,10 +1869,6 @@ const fotoramaVersion = '4.6.4';
1861
1869
calculateIndexes ( ) ;
1862
1870
}
1863
1871
1864
- function limitIndex ( index ) {
1865
- return minMaxLimit ( index , 0 , size - 1 ) ;
1866
- }
1867
-
1868
1872
jQuery . Fotorama = function ( $fotorama , opts ) {
1869
1873
var that = this ,
1870
1874
stamp = $ . now ( ) ,
@@ -1952,6 +1956,7 @@ const fotoramaVersion = '4.6.4';
1952
1956
scrollTop ,
1953
1957
scrollLeft ,
1954
1958
1959
+ // eslint-disable-next-line no-unused-vars
1955
1960
showedFLAG ,
1956
1961
pausedAutoplayFLAG ,
1957
1962
stoppedAutoplayFLAG ,
@@ -1986,11 +1991,16 @@ const fotoramaVersion = '4.6.4';
1986
1991
1987
1992
fotoramaData . fotorama = this ;
1988
1993
1994
+ function limitIndex ( index ) {
1995
+ return minMaxLimit ( index , 0 , size - 1 ) ;
1996
+ }
1997
+
1989
1998
/**
1990
1999
* Search video items in incoming data and transform object for video layout.
1991
2000
*
1992
2001
*/
1993
2002
function checkForVideo ( ) {
2003
+ // eslint-disable-next-line no-shadow
1994
2004
$ . each ( data , function ( i , dataFrame ) {
1995
2005
if ( ! dataFrame . i ) {
1996
2006
dataFrame . i = dataFrameCount ++ ;
@@ -2025,10 +2035,12 @@ const fotoramaVersion = '4.6.4';
2025
2035
}
2026
2036
2027
2037
function setStagePosition ( ) {
2038
+ var padding = 0 ;
2039
+
2028
2040
if ( $stage !== undefined ) {
2029
2041
2030
2042
if ( opts . navdir === 'vertical' ) {
2031
- var padding = opts . thumbwidth + opts . thumbmargin ;
2043
+ padding = opts . thumbwidth + opts . thumbmargin ;
2032
2044
2033
2045
$stage . css ( 'left' , padding ) ;
2034
2046
$arrNext . css ( 'right' , padding ) ;
@@ -2257,10 +2269,12 @@ const fotoramaVersion = '4.6.4';
2257
2269
2258
2270
}
2259
2271
2272
+ // eslint-disable-next-line no-shadow
2260
2273
function getThumbsInSlide ( $el , opts ) {
2261
2274
return Math . floor ( $wrap . width ( ) / ( opts . thumbwidth + opts . thumbmargin ) ) ;
2262
2275
}
2263
2276
2277
+ // eslint-disable-next-line no-shadow
2264
2278
function disableDirrection ( i ) {
2265
2279
return ! o_loop && ( ! ( activeIndex + i ) || ! ( activeIndex - size + i ) ) && ! $videoPlaying ;
2266
2280
}
@@ -2335,6 +2349,7 @@ const fotoramaVersion = '4.6.4';
2335
2349
indexes = new Array ( indexes ) ;
2336
2350
rangeFLAG = true ;
2337
2351
}
2352
+ // eslint-disable-next-line no-shadow
2338
2353
return $ . each ( indexes , function ( i , index ) {
2339
2354
if ( rangeFLAG ) { index = i ; }
2340
2355
if ( typeof index === 'number' ) {
@@ -2441,6 +2456,7 @@ const fotoramaVersion = '4.6.4';
2441
2456
} ) ;
2442
2457
}
2443
2458
2459
+ // eslint-disable-next-line no-shadow
2444
2460
function setMeasures ( width , height , ratio , index ) {
2445
2461
if ( ! measuresSetFLAG || measuresSetFLAG === '*' && index === startIndex ) {
2446
2462
@@ -2709,6 +2725,7 @@ const fotoramaVersion = '4.6.4';
2709
2725
}
2710
2726
2711
2727
function frameDraw ( indexes , type ) {
2728
+ // eslint-disable-next-line no-shadow
2712
2729
eachIndex ( indexes , type , function ( i , index , dataFrame , $frame , key , frameData ) {
2713
2730
if ( $frame ) { return ; }
2714
2731
@@ -2946,10 +2963,11 @@ const fotoramaVersion = '4.6.4';
2946
2963
}
2947
2964
2948
2965
function stageFramePosition ( indexes ) {
2966
+ // eslint-disable-next-line no-shadow
2949
2967
eachIndex ( indexes , 'stage' , function ( i , index , dataFrame , $frame , key , frameData ) {
2950
2968
if ( ! $frame ) { return ; }
2951
2969
2952
- var normalizedIndex = normalizeIndex ( index ) ;
2970
+ let normalizedIndex = normalizeIndex ( index ) ;
2953
2971
2954
2972
frameData . eq = normalizedIndex ;
2955
2973
@@ -3061,6 +3079,7 @@ const fotoramaVersion = '4.6.4';
3061
3079
function detachFrames ( key ) {
3062
3080
var _toDetach = toDetach [ key ] ;
3063
3081
3082
+ // eslint-disable-next-line no-shadow
3064
3083
$ . each ( activeIndexes , function ( i , index ) {
3065
3084
delete _toDetach [ normalizeIndex ( index ) ] ;
3066
3085
} ) ;
@@ -3604,6 +3623,7 @@ const fotoramaVersion = '4.6.4';
3604
3623
} ;
3605
3624
3606
3625
that . shuffle = function ( ) {
3626
+ // eslint-disable-next-line no-use-before-define
3607
3627
data && shuffle ( data ) && reset ( ) ;
3608
3628
return this ;
3609
3629
} ;
@@ -3774,7 +3794,7 @@ const fotoramaVersion = '4.6.4';
3774
3794
}
3775
3795
3776
3796
if ( ! result . moved ) {
3777
- var target = result . $target . closest ( '.' + navFrameClass , $navShaft ) [ 0 ] ;
3797
+ let target = result . $target . closest ( '.' + navFrameClass , $navShaft ) [ 0 ] ;
3778
3798
3779
3799
target && onNavFrameClick . call ( target , result . startEvent ) ;
3780
3800
} else if ( result . pos !== result . newPos ) {
@@ -3813,7 +3833,7 @@ const fotoramaVersion = '4.6.4';
3813
3833
onEnd : function ( e , direction ) {
3814
3834
onTouchStart ( ) ;
3815
3835
onTouchEnd ( ) ;
3816
- var newPos = stop ( $navShaft ) + direction * 0.25 ;
3836
+ let newPos = stop ( $navShaft ) + direction * 0.25 ;
3817
3837
3818
3838
$navShaft . css ( getTranslate ( minMaxLimit ( newPos , navShaftTouchTail . min , navShaftTouchTail . max ) ,
3819
3839
opts . navdir ) ) ;
@@ -3953,6 +3973,7 @@ const fotoramaVersion = '4.6.4';
3953
3973
}
3954
3974
}
3955
3975
3976
+ // eslint-disable-next-line no-shadow
3956
3977
$ . each ( 'load push pop shift unshift reverse sort splice' . split ( ' ' ) , function ( i , method ) {
3957
3978
that [ method ] = function ( ) {
3958
3979
data = data || [ ] ;
0 commit comments