Skip to content

Commit

Permalink
Merge pull request GalleriaJS#271 from ggilder/fix_responsive_scaling
Browse files Browse the repository at this point in the history
Fix issue with scaling using responsive: true
  • Loading branch information
davidhellsing committed Sep 11, 2012
2 parents def4458 + 12bdc36 commit 77391da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/galleria.js
Expand Up @@ -2566,7 +2566,7 @@ Galleria.prototype = {

// set ratio if height is < 2
if ( self._options.height < 2 ) {
self._ratio = self._options.height;
self._userRatio = self._ratio = self._options.height;
}

// the gallery is ready, let's just wait for the css
Expand Down Expand Up @@ -2913,8 +2913,8 @@ Galleria.prototype = {
// allow setting a height ratio instead of exact value
// useful when doing responsive galleries

if ( self._ratio ) {
num.height = num.width * self._ratio;
if ( self._userRatio ) {
num.height = num.width * self._userRatio;
}

return num;
Expand Down

0 comments on commit 77391da

Please sign in to comment.