From 11a68d36add3d4f8bdc4a679359da686496670d6 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 3 Mar 2020 20:25:36 +1300 Subject: [PATCH] fix vertical positioning on text slides --- openlp/core/display/html/display.js | 2 +- tests/js/test_display.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/display/html/display.js b/openlp/core/display/html/display.js index fd10d4e55..67ef7355d 100644 --- a/openlp/core/display/html/display.js +++ b/openlp/core/display/html/display.js @@ -1028,7 +1028,7 @@ var Display = { // These need to be fixed, in the Python they use a width passed in as a parameter mainStyle.width = theme.font_main_width + "px"; mainStyle.height = theme.font_main_height + "px"; - mainStyle.top = "" + theme.font_main_y + "px"; + mainStyle["margin-top"] = "" + theme.font_main_y + "px"; mainStyle.left = "" + theme.font_main_x + "px"; mainStyle.color = theme.font_main_color; mainStyle["font-family"] = theme.font_main_name; diff --git a/tests/js/test_display.js b/tests/js/test_display.js index ce0298e37..1fb7aaaae 100644 --- a/tests/js/test_display.js +++ b/tests/js/test_display.js @@ -717,7 +717,7 @@ describe("Display.setTextSlides", function () { Display.setTextSlides(slides); const slidesDiv = $(".text-slides")[0]; - expect(slidesDiv.style['top']).toEqual('789px'); + expect(slidesDiv.style['margin-top']).toEqual('789px'); expect(slidesDiv.style['left']).toEqual('1000px'); expect(slidesDiv.style['width']).toEqual('1230px'); expect(slidesDiv.style['height']).toEqual('4560px');