]> _ Git - fluidbook-html5.git/commitdiff
done #1450 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 22 Jun 2017 16:54:09 +0000 (18:54 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 22 Jun 2017 16:54:09 +0000 (18:54 +0200)
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/fluidbook.resize.js

index d5141d4f041848fca251cbd026b0d0c07df7f9f1..bb06f3af405db174b4ca6554bb9e7f764a8825a4 100644 (file)
@@ -28,6 +28,11 @@ FluidbookLinks.prototype = {
             return true;
         });
 
+        $(this.fluidbook).on('fluidbook.resize.orientation', function () {
+            $this.zoomLinkReset(true);
+        });
+
+
         $(document).on('click', '#zoomPopupOverlay, #zoomPopupWrapper,  #zoomPopupClose', function (e) {
             $this.zoomLinkReset();
             return false;
@@ -171,7 +176,15 @@ FluidbookLinks.prototype = {
         });
     },
 
+    zoomLinkClose: function (immediate) {
+        return this.zoomLinkReset(immediate);
+    },
+
     zoomLinkReset: function (immediate) {
+        if ($('#zoomPopupWrapper:visible').length == 0) {
+            return;
+        }
+
         if (immediate == undefined) {
             immediate = false;
         }
index 0665ed7c09c45ca51b256f4071d381ae82052ba6..5beb206782cbb0d15e0b28c86878ffcd25a1219d 100644 (file)
@@ -212,6 +212,7 @@ FluidbookResize.prototype = {
 
         $(window).scrollTop(0);
         $(window).trigger('fluidbookresize');
+        $(this.fluidbook).trigger('fluidbook.resize');
     },
     resizeNav: function (interfaceScale) {
         var topNext = (this.hh - (100 * interfaceScale)) / 2;
@@ -280,6 +281,7 @@ FluidbookResize.prototype = {
         if (changeOrientation) {
             this.fluidbook.zoom.resetZoom();
             this.fluidbook.pageTransition();
+            $(this.fluidbook).trigger('fluidbook.resize.orientation');
         }
     },
     getScreenFluidbookWidth: function () {