forked from openlp/openlp
Improve image scaling on display
This commit is contained in:
parent
cd25766b79
commit
62ca28cf09
@ -426,10 +426,10 @@ var Display = {
|
|||||||
var section = document.createElement("section");
|
var section = document.createElement("section");
|
||||||
section.setAttribute("id", index);
|
section.setAttribute("id", index);
|
||||||
section.setAttribute("data-background", "#000");
|
section.setAttribute("data-background", "#000");
|
||||||
|
section.setAttribute("style", "height: 100%; width: 100%;");
|
||||||
var img = document.createElement('img');
|
var img = document.createElement('img');
|
||||||
img.src = slide["path"];
|
img.src = slide["path"];
|
||||||
//img.setAttribute("style", "height: 100%; width: 100%;");
|
img.setAttribute("style", "max-width: 100%; height: auto; margin: 0; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);");
|
||||||
img.setAttribute("style", "max-width: 100%; height: auto; vertical-align: middle");
|
|
||||||
section.appendChild(img);
|
section.appendChild(img);
|
||||||
slidesDiv.appendChild(section);
|
slidesDiv.appendChild(section);
|
||||||
Display._slides[index.toString()] = index;
|
Display._slides[index.toString()] = index;
|
||||||
|
Loading…
Reference in New Issue
Block a user