fix vertical positioning on text slides

This commit is contained in:
Daniel 2020-03-03 20:25:36 +13:00
parent 79734f9f76
commit 11a68d36ad
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
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;

View File

@ -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');