@@ -363,7 +363,9 @@ define([
363
363
thumbsParent ,
364
364
thumbs ,
365
365
t ,
366
- tmpVideoData ;
366
+ tmpVideoData ,
367
+ currentItem ,
368
+ iconClass = 'video-thumb-icon' ;
367
369
368
370
if ( ! fotorama . activeFrame . $navThumbFrame ) {
369
371
$ ( this . element ) . on ( 'fotorama:showend' , $ . proxy ( function ( evt , fotoramaData ) {
@@ -375,14 +377,19 @@ define([
375
377
return null ;
376
378
}
377
379
378
- thumbsParent = fotorama . activeFrame . $navThumbFrame . parent ( ) ,
379
- thumbs = thumbsParent . find ( '.fotorama__nav__frame' ) ;
380
+ thumbsParent = fotorama . activeFrame . $navThumbFrame . parent ( ) ;
381
+ thumbs = thumbsParent . find ( '.fotorama__nav__frame:visible ' ) ;
380
382
381
383
for ( t = 0 ; t < thumbs . length ; t ++ ) {
382
384
tmpVideoData = this . options . VideoData [ t ] ;
385
+ currentItem = thumbs . eq ( t ) ;
386
+
387
+ if ( fotorama . options . nav === 'dots' && currentItem . hasClass ( iconClass ) ) {
388
+ currentItem . removeCLass ( iconClass )
389
+ }
383
390
384
- if ( tmpVideoData . mediaType === this . VID ) {
385
- thumbsParent . find ( '.fotorama__nav__frame:eq(' + t + ')' ) . addClass ( 'video-thumb-icon' ) ;
391
+ if ( tmpVideoData . mediaType === this . VID && fotorama . options . nav === 'thumbs' ) {
392
+ currentItem . addClass ( iconClass ) ;
386
393
}
387
394
}
388
395
$ ( this . element ) . on ( 'fotorama:showend' , $ . proxy ( function ( evt , fotoramaData ) {
@@ -594,7 +601,7 @@ define([
594
601
iframeElement = $ ( this ) . find ( 'iframe' ) ,
595
602
currentIndex ,
596
603
itemIndex ,
597
- videoPreview = $item . find ( 'img' ) ;
604
+ videoPreview = $item . find ( 'img' ) . not ( '.fotorama__img--full' ) ;
598
605
599
606
if ( iframeElement . length === 0 ) {
600
607
return ;
0 commit comments