From 24ef0dd9615c6521a5eac300f75b070bb8291d38 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 10 Feb 2015 17:31:31 +1100 Subject: [PATCH] fixes small issue with the image layout when viewing media folder, in some cases when there are consecutive small images that when placed beside each other cannot fit the width, they'll end up individually on a row due to their small size, this fix allows for a leniency when fitting to the width so in these cases they'll get rendered together on the row even though they won't actually fit. --- .../src/common/services/util.service.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js index 809f86d807..b726bef44a 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js @@ -195,8 +195,12 @@ function umbPhotoFolderHelper($compile, $log, $timeout, $filter, imageHelper, me //if there is only one image, then return the target height return targetHeight; } + else if (currRowWidth / targetRowWidth > 0.90) { + //it's close enough, it's at least 90% of the width so we'll accept it with the target height + return targetHeight; + } else { - //if it's not successful, return false + //if it's not successful, return null return null; } },