From 6ce3fb4b2a121e3b75e130c678b4019184ee219c Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 7 Sep 2020 18:32:06 +0200 Subject: [PATCH] wip #3869 @0.25 --- js/libs/fluidbook/fluidbook.background.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.background.js b/js/libs/fluidbook/fluidbook.background.js index 8a9b96f4..fc157893 100644 --- a/js/libs/fluidbook/fluidbook.background.js +++ b/js/libs/fluidbook/fluidbook.background.js @@ -19,14 +19,20 @@ FluidbookBackground.prototype = { if (Object.keys(this.fluidbook.settings.dynamicBackgroundColor).length > 0) { var $this = this; $(this.fluidbook).on('fluidbook.page.change.end', function (e, page) { - var c = $this.fluidbook.settings.dynamicBackgroundColor[page]; + var s = $this.fluidbook.settings.dynamicBackgroundColor[page]; + var back = s[0]; + var arrows = ''; + if (s.length > 1) { + arrows = s[1]; + } var style; - if (c === undefined || c === null || c === '' || c === '-') { + if (back === undefined || back === null || back === '' || back === '-') { style = ''; } else { - style = "background-image:none !important;background-color:" + c + " !important;"; + style = "background-image:none !important;background-color:" + back + " !important;"; } $('#background').attr('style', style); + $("#prev-arrows,#next-arrows").css('color', arrows); }); } }, -- 2.39.5