File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 874874 transition-property : none ;
875875 }
876876 }
877+ iframe {
878+ width : calc (~ ' 100% - @{fotorama-arw-size} * 2' );
879+ left : @fotorama-arw-size ;
880+ }
877881 }
878882}
879883
Original file line number Diff line number Diff line change @@ -807,6 +807,22 @@ define([
807807 } ) ;
808808 }
809809
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+
810826 $ . extend ( config . magnifierOpts , {
811827 zoomable : false ,
812828 thumb : '.fotorama__img' ,
@@ -836,6 +852,7 @@ define([
836852 ! checkForVideo ( $activeStageFrame ) && $ ( $activeStageFrame ) . magnify ( config . magnifierOpts ) ;
837853 }
838854 } ) ;
855+
839856 $ ( element ) . on ( 'gallery:loaded' , function ( e ) {
840857 var $prevImage ;
841858 $ ( element ) . find ( gallerySelector )
@@ -888,6 +905,7 @@ define([
888905 resetVars ( $ ( fullscreenImageSelector ) ) ;
889906 magnifierFullscreen ( fotorama ) ;
890907 mousewheel ( e , fotorama , element ) ;
908+ showArrows ( fotorama ) ;
891909
892910 if ( $prevImage ) {
893911 calculateMinSize ( $prevImage ) ;
You can’t perform that action at this time.
0 commit comments