From 62ca28cf094453dde3f426fb813485ca63799ea2 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Wed, 21 Aug 2019 21:13:27 +0200 Subject: [PATCH] Improve image scaling on display --- openlp/core/display/html/display.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/display/html/display.js b/openlp/core/display/html/display.js index 203709e00..76937ea4f 100644 --- a/openlp/core/display/html/display.js +++ b/openlp/core/display/html/display.js @@ -426,10 +426,10 @@ var Display = { var section = document.createElement("section"); section.setAttribute("id", index); section.setAttribute("data-background", "#000"); + section.setAttribute("style", "height: 100%; width: 100%;"); var img = document.createElement('img'); img.src = slide["path"]; - //img.setAttribute("style", "height: 100%; width: 100%;"); - img.setAttribute("style", "max-width: 100%; height: auto; vertical-align: middle"); + img.setAttribute("style", "max-width: 100%; height: auto; margin: 0; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"); section.appendChild(img); slidesDiv.appendChild(section); Display._slides[index.toString()] = index;