Skip to content

Commit

Permalink
revert bad change on framed photos when small
Browse files Browse the repository at this point in the history
  • Loading branch information
opus1269 committed Mar 3, 2016
1 parent 3554966 commit a29e319
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/scripts/screensaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ t.stretchPhoto = function(idx) {
t.framePhoto = function(idx) {
var padding, border, borderBot;
var e = t.getEls(idx);
var img = e.image.$.img;
var width, height;
var frWidth, frHeight;
var aspect = e.item.aspectRatio;
Expand All @@ -311,6 +312,9 @@ t.framePhoto = function(idx) {
frWidth = width + border * 2;
frHeight = height + borderBot + border;

img.style.height = height + 'px';
img.style.width = width + 'px';

e.image.height = height;
e.image.width = width;
e.image.style.top = (screen.height - frHeight) / 2 + 'px';
Expand Down

0 comments on commit a29e319

Please sign in to comment.