Skip to content

Commit

Permalink
Added namespace to product videos fotorama events
Browse files Browse the repository at this point in the history
  • Loading branch information
roma84 committed Nov 28, 2017
1 parent 3d628f8 commit 56802d3
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ define([
*/
clearEvents: function () {
this.fotoramaItem.off(
'fotorama:show ' +
'fotorama:showend ' +
'fotorama:fullscreenenter ' +
'fotorama:fullscreenexit'
'fotorama:show.' + this.PV +
' fotorama:showend.' + this.PV +
' fotorama:fullscreenenter.' + this.PV +
' fotorama:fullscreenexit.' + this.PV
);
},

Expand Down Expand Up @@ -232,11 +232,11 @@ define([
* @private
*/
_listenForFullscreen: function () {
this.fotoramaItem.on('fotorama:fullscreenenter', $.proxy(function () {
this.fotoramaItem.on('fotorama:fullscreenenter.' + this.PV, $.proxy(function () {
this.isFullscreen = true;
}, this));

this.fotoramaItem.on('fotorama:fullscreenexit', $.proxy(function () {
this.fotoramaItem.on('fotorama:fullscreenexit.' + this.PV, $.proxy(function () {
this.isFullscreen = false;
this._hideVideoArrows();
}, this));
Expand Down Expand Up @@ -468,7 +468,7 @@ define([
t;

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

Expand All @@ -486,7 +486,7 @@ define([
this._checkForVideo(e, fotorama, t + 1);
}

this.fotoramaItem.on('fotorama:showend', $.proxy(function (evt, fotoramaData) {
this.fotoramaItem.on('fotorama:showend.' + this.PV, $.proxy(function (evt, fotoramaData) {
$(fotoramaData.activeFrame.$stageFrame).removeAttr('href');
}, this));
},
Expand Down Expand Up @@ -528,15 +528,15 @@ define([
* @private
*/
_attachFotoramaEvents: function () {
this.fotoramaItem.on('fotorama:showend', $.proxy(function (e, fotorama) {
this.fotoramaItem.on('fotorama:showend.' + this.PV, $.proxy(function (e, fotorama) {
this._startPrepareForPlayer(e, fotorama);
}, this));

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

this.fotoramaItem.on('fotorama:fullscreenexit', $.proxy(function (e, fotorama) {
this.fotoramaItem.on('fotorama:fullscreenexit.' + this.PV, $.proxy(function (e, fotorama) {
fotorama.activeFrame.$stageFrame.find('.' + this.PV).remove();
this._startPrepareForPlayer(e, fotorama);
}, this));
Expand Down

0 comments on commit 56802d3

Please sign in to comment.