From 8330a9dd0087fca3b8110d570f4a01f3e4c7009d Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 4 Jan 2019 19:02:13 +0100 Subject: [PATCH] wip #2441 --- js/libs/fluidbook/fluidbook.resize.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 150bd509..23146210 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -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; -- 2.39.5