Skip to content

Commit 0f1e753

Browse files
committed
Merge pull request #39 from ulaharbmg/JS-255
JS-255: JS-46: JS Widgets: Gallery (Part 2) - Fix issue in fullscreen mode
2 parents dce931b + 46b1f08 commit 0f1e753

File tree

15 files changed

+1361
-1271
lines changed

15 files changed

+1361
-1271
lines changed

app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,9 @@ define([
396396
$(this.element).on('fotorama:showend', $.proxy(function (evt, fotoramaData) {
397397
$(fotoramaData.activeFrame.$stageFrame).removeAttr('href');
398398
}, this));
399-
400-
this._startPrepareForPlayer(e, fotorama);
399+
this._checkForVideo(e, fotorama, -1);
400+
this._checkForVideo(e, fotorama, 0);
401+
this._checkForVideo(e, fotorama, 1);
401402
},
402403

403404
/**
@@ -516,8 +517,10 @@ define([
516517
$image.find('.magnify-lens').remove();
517518
$image.on('click tap', function () {
518519
if ($(this).hasClass('video-unplayed') && $(this).find('iframe').length === 0) {
519-
$('.fotorama__arr--next').hide();
520-
$('.fotorama__arr--prev').hide();
520+
if ($('.fotorama-item').data('fotorama').options.arrows) {
521+
$('.fotorama__arr--next').hide();
522+
$('.fotorama__arr--prev').hide();
523+
}
521524

522525
$(this).removeClass('video-unplayed');
523526
$(this).find('.' + PV).productVideoLoader();
@@ -563,23 +566,23 @@ define([
563566
clearInterval(waitForFroogaloop);
564567
fotorama.requestFullScreen();
565568
$(this.element).data('fotorama').activeFrame.$stageFrame[0].click();
566-
$('.fotorama__fullscreen-icon').css({
569+
/*$('.fotorama__fullscreen-icon').css({
567570
opacity: '1',
568571
visibility: 'visible',
569572
display: 'block'
570-
});
573+
});*/
571574
this.Base = false;
572575
}
573576
}, this), 50);
574577
} else { //if not a vimeo - play it immediately with a little lag in case for fotorama fullscreen
575578
setTimeout($.proxy(function () {
576579
fotorama.requestFullScreen();
577580
$(this.element).data('fotorama').activeFrame.$stageFrame[0].click();
578-
$('.fotorama__fullscreen-icon').css({
581+
/*$('.fotorama__fullscreen-icon').css({
579582
opacity: '1',
580583
visibility: 'visible',
581584
display: 'block'
582-
});
585+
});*/
583586
this.Base = false;
584587
}, this), 50);
585588
}
@@ -628,8 +631,10 @@ define([
628631
$(this).remove();
629632
$item.append(cloneVideoDiv);
630633
$item.addClass('video-unplayed');
631-
$('.fotorama__arr--next').show();
632-
$('.fotorama__arr--prev').show();
634+
if ($('.fotorama-item').data('fotorama').options.arrows) {
635+
$('.fotorama__arr--next').show();
636+
$('.fotorama__arr--prev').show();
637+
}
633638
self._hideCloseVideo();
634639

635640
});

app/design/frontend/Magento/blank/etc/view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
</var>
216216

217217
<var name="magnifier">
218-
<var name="fullscreenzoom">5</var> <!-- Zoom for fullscreen (integer)-->
218+
<var name="fullscreenzoom">20</var> <!-- Zoom for fullscreen (integer)-->
219219
<var name="top"></var> <!-- Top position of magnifier -->
220220
<var name="left"></var> <!-- Left position of magnifier -->
221221
<var name="width"></var> <!-- Width of magnifier block -->

app/design/frontend/Magento/luma/etc/view.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@
211211
<var name="thumbheight">150</var> <!-- Height of thumbnails in fullscreen -->
212212
<var name="navigation_carousel">true</var> <!-- Display navigation thumbs as carousel (true/false) -->
213213
<var name="transition">
214-
<var name="effect">dissolve</var> <!-- Sets transition effect for slides changing (slide/crossfade/dissolve) -->
214+
<var name="effect">slide</var> <!-- Sets transition effect for slides changing (slide/crossfade/dissolve) -->
215215
<var name="duration">500</var> <!-- Sets transition duration in ms -->
216216
<var name="carousel">true</var> <!-- Display navigation thumbs as carousel (true/false) -->
217217
</var>
218218
</var>
219219
</var>
220220

221221
<var name="magnifier">
222-
<var name="fullscreenzoom">5</var> <!-- Zoom for fullscreen (integer)-->
222+
<var name="fullscreenzoom">20</var> <!-- Zoom for fullscreen (integer)-->
223223
<var name="top"></var> <!-- Top position of magnifier -->
224224
<var name="left"></var> <!-- Left position of magnifier -->
225225
<var name="width"></var> <!-- Width of magnifier block -->

0 commit comments

Comments
 (0)