File tree 2 files changed +22
-0
lines changed 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 874
874
transition-property : none ;
875
875
}
876
876
}
877
+ iframe {
878
+ width : calc (~ ' 100% - @{fotorama-arw-size} * 2' );
879
+ left : @fotorama-arw-size ;
880
+ }
877
881
}
878
882
}
879
883
Original file line number Diff line number Diff line change @@ -807,6 +807,22 @@ define([
807
807
} ) ;
808
808
}
809
809
810
+ /**
811
+ * Displays navigation arrows on preview if it contains ifraime.
812
+ * @param fotorama - object of fotorama
813
+ */
814
+ function showArrows ( fotorama ) {
815
+ var $arrows = $ ( '[data-gallery-role="arrow"]' ) ;
816
+
817
+ if ( ( fotorama . activeFrame . $stageFrame . find ( ':has(iframe)' ) . length && fotorama . fullScreen ) ||
818
+ ( fotorama . fullScreen && config . fullscreen . arrows ) ||
819
+ ( ! fotorama . fullScreen && config . arrows ) ) {
820
+ $arrows . show ( ) ;
821
+ } else {
822
+ $arrows . hide ( ) ;
823
+ }
824
+ } ;
825
+
810
826
$ . extend ( config . magnifierOpts , {
811
827
zoomable : false ,
812
828
thumb : '.fotorama__img' ,
@@ -836,6 +852,7 @@ define([
836
852
! checkForVideo ( $activeStageFrame ) && $ ( $activeStageFrame ) . magnify ( config . magnifierOpts ) ;
837
853
}
838
854
} ) ;
855
+
839
856
$ ( element ) . on ( 'gallery:loaded' , function ( e ) {
840
857
var $prevImage ;
841
858
$ ( element ) . find ( gallerySelector )
@@ -888,6 +905,7 @@ define([
888
905
resetVars ( $ ( fullscreenImageSelector ) ) ;
889
906
magnifierFullscreen ( fotorama ) ;
890
907
mousewheel ( e , fotorama , element ) ;
908
+ showArrows ( fotorama ) ;
891
909
892
910
if ( $prevImage ) {
893
911
calculateMinSize ( $prevImage ) ;
You can’t perform that action at this time.
0 commit comments