Skip to content

Commit

Permalink
JS-400: Vertical thumbnails layout problem
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiiabuniak committed Jan 22, 2016
1 parent cb1280f commit 5883b26
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ define([

if ($image.type === 'image') {
$image.$navThumbFrame && $image.$navThumbFrame.removeClass(this.TI);
this._hideCloseVideo();
return;
} else if ($image.$navThumbFrame && $image.type === 'video') {
!$image.$navThumbFrame.hasClass(this.TI) && $image.$navThumbFrame.addClass(this.TI);
Expand Down
17 changes: 17 additions & 0 deletions lib/web/mage/gallery/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ define([
});

return slideTransform.filter(Boolean);
},

_toNumber = function (str) {

var type = typeof(str);

if (type === 'string') {
return parseInt(str);
} else {
return str;
}
};

return Class.extend({
Expand Down Expand Up @@ -99,6 +110,12 @@ define([
config.fullscreen.arrows = false;
}
}

config.options.width = _toNumber(config.options.width);
config.options.height = _toNumber(config.options.height);
config.options.thumbwidth = _toNumber(config.options.thumbwidth);
config.options.thumbheight = _toNumber(config.options.thumbheight);

config.options.swipe = true;
this.config = config;

Expand Down

0 comments on commit 5883b26

Please sign in to comment.