]> _ Git - fluidbook-html5.git/commitdiff
wip #1748 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Oct 2017 16:42:39 +0000 (18:42 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Oct 2017 16:42:39 +0000 (18:42 +0200)
js/libs/fluidbook/fluidbook.background.js
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.resize.js

index 028b97ff0848b11eb538321e2e0cb0d4686c4f82..0a14f0c0c0e3bdbde5adb7244727088d52d59aec 100644 (file)
@@ -20,7 +20,10 @@ FluidbookBackground.prototype = {
         }
 
         var left, top, iw, ih;
-        if (this.fluidbook.datas.repeat == Fluidbook.NONE) {
+
+        if (this.fluidbook.datas.backgroundImageDimensions == undefined) {
+
+        } else if (this.fluidbook.datas.repeat == Fluidbook.NONE) {
             iw = this.fluidbook.datas.backgroundImageDimensions.width;
             ih = this.fluidbook.datas.backgroundImageDimensions.height;
 
index d73b637fb7e655d49462c63f18c3605953d9c639..cb09085caca62bbeeae2869e17d2bb2fc19e1519 100644 (file)
@@ -625,6 +625,7 @@ Fluidbook.prototype = {
         if (d == undefined) {
             d = 1;
         }
+        $(this).trigger('fluidbook.page.change.start', [page]);
         this.tooltip.hideTooltip();
         $(".axis_y").removeClass('axis_y');
         $(".axis_x").removeClass('axis_x');
index c11fd29e5b052d62d65dd88e165ab50eeeacab28..68c6334496ea38c9013bccbe021840a0f651f4c7 100644 (file)
@@ -226,7 +226,7 @@ FluidbookResize.prototype = {
 
         $(window).scrollTop(0);
         $(window).trigger('fluidbookresize');
-        $(this.fluidbook).trigger('fluidbook.resize');
+        $(this.fluidbook).trigger('fluidbook.resize', {ww: this.ww, wh: this.wh, orientation: this.orientation, fluidbookrect: $("#fluidbook").get(0).getBoundingClientRect()});
     },
     resizeNav: function (interfaceScale) {
         var topNext = (this.hh - (100 * interfaceScale)) / 2;
@@ -307,7 +307,7 @@ FluidbookResize.prototype = {
             $(this.fluidbook).trigger('fluidbook.resize.beforeOrientationChange');
             this.fluidbook.zoom.resetZoom();
             this.fluidbook.pageTransition();
-            $(this.fluidbook).trigger('fluidbook.resize.orientation');
+            $(this.fluidbook).trigger('fluidbook.resize.orientation', this.orientation);
         }
     },
     getScreenFluidbookWidth: function () {