]> _ Git - fluidbook-html5.git/commitdiff
wip #3962 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Oct 2020 10:53:20 +0000 (11:53 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Oct 2020 10:53:20 +0000 (11:53 +0100)
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.notes.js
js/libs/fluidbook/fluidbook.pagetransitions.js
js/libs/fluidbook/fluidbook.resize.js

index 43e994886c1508fda361272599cb843b429cf3ab..04468d284734e996753c9dba3ae4e5a639412fc0 100644 (file)
@@ -713,6 +713,9 @@ FluidbookMenu.prototype = {
                     fullscreen = true;
                 }
                 break;
+            case 'notes':
+                fullscreen = true;
+                break;
             case 'share':
                 w = 200;
                 break;
index 249e6d70686f98b10df1f8096db352b7dba4a793..e6c9371b689ac61a6282dca5071fe93a4fbda6c5 100644 (file)
@@ -34,10 +34,15 @@ FluidbookNotes.prototype = {
         });
         $(this.fluidbook).on('fluidbook.page.change.start', function () {
             $this.clearNotes();
+            $this.resize();
         });
         $(this.fluidbook).on('fluidbook.page.change.end', function () {
-            $this.initNotesFromStorage();
+            setTimeout(function () {
+                $this.resize();
+                $this.initNotesFromStorage();
+            }, 1000);
         });
+
         $(document).on('click', '.notes-toggle', function () {
             $this.toggleNotes();
             return false;
@@ -231,6 +236,8 @@ FluidbookNotes.prototype = {
         }
     },
     resize: function () {
+        this.fluidbook.resize.updateFluidbookRect();
+
         var maxx = this.fluidbook.resize.fluidbookrect.width;
         var maxy = this.fluidbook.resize.fluidbookrect.height;
         var minx = this.fluidbook.resize.fluidbookrect.x;
index 892748982e8fe3c8f8f6a187a426076481eb2d41..33dc4b3e0aaad9a5f92e8068f124718ff2b53d88 100644 (file)
@@ -328,9 +328,11 @@ FluidbookPageTransition.prototype = {
             $(move).removeClass('animate');
         }
 
+        var $this=this;
         var delay = this.fluidbook.support.android ? this.fluidbook.settings.mobileTransitionDuration * 1000 : 10;
         setTimeout(function () {
             move.transform({translateX: left + 'px'});
+            $this.fluidbook.resize.updateFluidbookRect();
         }, delay);
     },
 
index 2669a1e5f8ce6f9310dca4b5b5d2c0bfd15d6b60..1477b0186ab76aab776c270b13dba5c4cc84807b 100644 (file)
@@ -264,7 +264,7 @@ FluidbookResize.prototype = {
 
         this.refw = fw;
         this.refh = fh;
-        this.fluidbookrect = $("#fluidbook").get(0).getBoundingClientRect();
+        this.updateFluidbookRect();
 
         if (this.fluidbook.help) {
             this.fluidbook.help.resize(this.ww, this.hh, interfaceScale, navScale);
@@ -323,6 +323,7 @@ FluidbookResize.prototype = {
 
         };
 
+
         if (this.fluidbook.interface.arrowsEnabled()) {
             try {
                 data.arrowLeftRect = $("#prev-arrows").get(0).getBoundingClientRect();
@@ -334,6 +335,11 @@ FluidbookResize.prototype = {
         $(this.fluidbook).trigger('fluidbook.resize', data);
 
     },
+
+    updateFluidbookRect: function () {
+        this.fluidbookrect = $("#fluidbook").get(0).getBoundingClientRect();
+    },
+
     resizeNav: function (interfaceScale) {
         var $this = this;
         if (this.fluidbook.interface.arrowsEnabled()) {