]> _ Git - fluidbook-html5.git/commitdiff
wip #2441
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 4 Jan 2019 18:02:13 +0000 (19:02 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 4 Jan 2019 18:02:13 +0000 (19:02 +0100)
js/libs/fluidbook/fluidbook.resize.js

index 150bd5095a44dd84e6904bea17c3332d032258e6..23146210b6f9accc27cb2c695228beb02693d0f8 100644 (file)
@@ -282,15 +282,22 @@ FluidbookResize.prototype = {
         this.checkLogoVisibility();
 
         $(window).scrollTop(0);
-        $(this.fluidbook).trigger('fluidbook.resize', {
+        var data = {
             ww: this.ww,
             hh: this.hh,
             orientation: this.orientation,
             bookScale: this.bookScale,
             fluidbookrect: $("#fluidbook").get(0).getBoundingClientRect(),
-            arrowLeftRect: $("#previous").get(0).getBoundingClientRect(),
-            arrowRightRect: $("#next").get(0).getBoundingClientRect(),
-        });
+
+        };
+        try {
+            data.arrowLeftRect = $("#previous").get(0).getBoundingClientRect();
+            data.arrowRightRect = $("#next").get(0).getBoundingClientRect();
+        } catch (e) {
+
+        }
+        $(this.fluidbook).trigger('fluidbook.resize', data);
+
     },
     resizeNav: function (interfaceScale) {
         var $this = this;