Merge branch 'fix_vertical_positioning' into 'master'

fix vertical positioning on text slides

Closes #422

See merge request openlp/openlp!147
This commit is contained in:
Tim Bentley 2020-03-03 17:06:29 +00:00
commit d4e6bf7a42
2 changed files with 2 additions and 2 deletions

View File

@ -1028,7 +1028,7 @@ var Display = {
// These need to be fixed, in the Python they use a width passed in as a parameter // 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.width = theme.font_main_width + "px";
mainStyle.height = theme.font_main_height + "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.left = "" + theme.font_main_x + "px";
mainStyle.color = theme.font_main_color; mainStyle.color = theme.font_main_color;
mainStyle["font-family"] = theme.font_main_name; mainStyle["font-family"] = theme.font_main_name;

View File

@ -717,7 +717,7 @@ describe("Display.setTextSlides", function () {
Display.setTextSlides(slides); Display.setTextSlides(slides);
const slidesDiv = $(".text-slides")[0]; 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['left']).toEqual('1000px');
expect(slidesDiv.style['width']).toEqual('1230px'); expect(slidesDiv.style['width']).toEqual('1230px');
expect(slidesDiv.style['height']).toEqual('4560px'); expect(slidesDiv.style['height']).toEqual('4560px');