Skip to content

Commit

Permalink
JS-356: code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeryYafremau committed Dec 10, 2015
1 parent f213258 commit 296d777
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 4 additions & 0 deletions lib/web/mage/gallery/gallery.less
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,10 @@
transition-property: none;
}
}
iframe {
width: calc(~'100% - @{fotorama-arw-size} * 2');
left: @fotorama-arw-size;
}
}
}

Expand Down
18 changes: 8 additions & 10 deletions lib/web/magnifier/magnify.js
Original file line number Diff line number Diff line change
Expand Up @@ -731,17 +731,15 @@ define([
* Displays navigation arrows on preview if it contains ifraime.
* @param fotorama - object of fotorama
*/
var showArrows = function (fotorama) {
if (fotorama.activeFrame.$stageFrame.find(':has(iframe)').length ||
($(gallerySelector).data('fotorama').fullScreen && config.fullscreen.arrows) ||
(!($(gallerySelector).data('fotorama').fullScreen && config.arrows))) {
fotorama.setOptions({
arrows: true
});
function showArrows (fotorama) {
var $arrows = $('[data-gallery-role="arrow"]');

if ((fotorama.activeFrame.$stageFrame.find(':has(iframe)').length && fotorama.fullScreen) ||
(fotorama.fullScreen && config.fullscreen.arrows) ||
(!fotorama.fullScreen && config.arrows)) {
$arrows.show();
} else {
fotorama.setOptions({
arrows: false
});
$arrows.hide();
}
};

Expand Down

0 comments on commit 296d777

Please sign in to comment.