Fixes: U4-4634 Image preview in Media is stretched

This commit is contained in:
Shannon
2014-08-08 12:00:30 -06:00
parent 6e3d0b5d91
commit 24a6ae4e32

View File

@@ -208,18 +208,6 @@ function umbPhotoFolderHelper($compile, $log, $timeout, $filter, imageHelper, me
for (var i = 0; i < imgs.length; i++) {
//get the lower width to ensure it always fits
var scaledWidth = Math.floor(this.getScaledWidth(imgs[i], imageRowHeight.height));
//in this case, a single image will not fit into the row so we need to crop/center
// width the full width and the min display height
if (imageRowHeight.imgCount === 1) {
sizes.push({
width: targetWidth,
//ensure that the height is rounded
height: Math.round(minDisplayHeight)
});
row.images.push(imgs[i]);
break;
}
if (currRowWidth + scaledWidth <= targetWidth) {
currRowWidth += scaledWidth;