From 9778acda77289e89d41ff887db0c2da14d22c3bf Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 12 Dec 2019 19:19:53 -0500 Subject: [PATCH] uifix --- web/js/dom.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/web/js/dom.js b/web/js/dom.js index 71e3ea1..b02c932 100644 --- a/web/js/dom.js +++ b/web/js/dom.js @@ -194,12 +194,14 @@ function createDocCard(hit) { thumbnailOverlay.setAttribute("class", "card-img-overlay"); //Resolution - let resolutionBadge = document.createElement("span"); - resolutionBadge.setAttribute("class", "badge badge-resolution"); - if (hit["_source"].hasOwnProperty("width")) { - resolutionBadge.appendChild(document.createTextNode(hit["_source"]["width"] + "x" + hit["_source"]["height"])); + if (hit["_source"].hasOwnProperty("width") && hit["_source"]["width"] > 32 && hit["_source"]["height"] > 32) { + let resolutionBadge = document.createElement("span"); + resolutionBadge.setAttribute("class", "badge badge-resolution"); + if (hit["_source"].hasOwnProperty("width")) { + resolutionBadge.appendChild(document.createTextNode(hit["_source"]["width"] + "x" + hit["_source"]["height"])); + } + thumbnailOverlay.appendChild(resolutionBadge); } - thumbnailOverlay.appendChild(resolutionBadge); // Hover if (thumbnail && hit["_source"]["videoc"] === "gif") {