Skip to content

Commit d95efd5

Browse files
MAGETWO-84903: Added namespace to product videos fotorama events #12469
2 parents d2d66d9 + 847bd50 commit d95efd5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ define([
175175
*/
176176
clearEvents: function () {
177177
this.fotoramaItem.off(
178-
'fotorama:show ' +
179-
'fotorama:showend ' +
180-
'fotorama:fullscreenenter ' +
181-
'fotorama:fullscreenexit'
178+
'fotorama:show.' + this.PV +
179+
' fotorama:showend.' + this.PV +
180+
' fotorama:fullscreenenter.' + this.PV +
181+
' fotorama:fullscreenexit.' + this.PV
182182
);
183183
},
184184

@@ -232,11 +232,11 @@ define([
232232
* @private
233233
*/
234234
_listenForFullscreen: function () {
235-
this.fotoramaItem.on('fotorama:fullscreenenter', $.proxy(function () {
235+
this.fotoramaItem.on('fotorama:fullscreenenter.' + this.PV, $.proxy(function () {
236236
this.isFullscreen = true;
237237
}, this));
238238

239-
this.fotoramaItem.on('fotorama:fullscreenexit', $.proxy(function () {
239+
this.fotoramaItem.on('fotorama:fullscreenexit.' + this.PV, $.proxy(function () {
240240
this.isFullscreen = false;
241241
this._hideVideoArrows();
242242
}, this));
@@ -468,7 +468,7 @@ define([
468468
t;
469469

470470
if (!fotorama.activeFrame.$navThumbFrame) {
471-
this.fotoramaItem.on('fotorama:showend', $.proxy(function (evt, fotoramaData) {
471+
this.fotoramaItem.on('fotorama:showend.' + this.PV, $.proxy(function (evt, fotoramaData) {
472472
$(fotoramaData.activeFrame.$stageFrame).removeAttr('href');
473473
}, this));
474474

@@ -486,7 +486,7 @@ define([
486486
this._checkForVideo(e, fotorama, t + 1);
487487
}
488488

489-
this.fotoramaItem.on('fotorama:showend', $.proxy(function (evt, fotoramaData) {
489+
this.fotoramaItem.on('fotorama:showend.' + this.PV, $.proxy(function (evt, fotoramaData) {
490490
$(fotoramaData.activeFrame.$stageFrame).removeAttr('href');
491491
}, this));
492492
},
@@ -528,15 +528,15 @@ define([
528528
* @private
529529
*/
530530
_attachFotoramaEvents: function () {
531-
this.fotoramaItem.on('fotorama:showend', $.proxy(function (e, fotorama) {
531+
this.fotoramaItem.on('fotorama:showend.' + this.PV, $.proxy(function (e, fotorama) {
532532
this._startPrepareForPlayer(e, fotorama);
533533
}, this));
534534

535-
this.fotoramaItem.on('fotorama:show', $.proxy(function (e, fotorama) {
535+
this.fotoramaItem.on('fotorama:show.' + this.PV, $.proxy(function (e, fotorama) {
536536
this._unloadVideoPlayer(fotorama.activeFrame.$stageFrame.parent(), fotorama, true);
537537
}, this));
538538

539-
this.fotoramaItem.on('fotorama:fullscreenexit', $.proxy(function (e, fotorama) {
539+
this.fotoramaItem.on('fotorama:fullscreenexit.' + this.PV, $.proxy(function (e, fotorama) {
540540
fotorama.activeFrame.$stageFrame.find('.' + this.PV).remove();
541541
this._startPrepareForPlayer(e, fotorama);
542542
}, this));

0 commit comments

Comments
 (0)