]> _ Git - fluidbook-html5.git/commitdiff
wip #3869 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 7 Sep 2020 16:32:06 +0000 (18:32 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 7 Sep 2020 16:32:06 +0000 (18:32 +0200)
js/libs/fluidbook/fluidbook.background.js

index 8a9b96f4c1189e458f2af7c6889f32997a377034..fc157893002145a9b6553ba25cc8f04c5b777392 100644 (file)
@@ -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);
             });
         }
     },