]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5985 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 2 Jun 2023 17:19:40 +0000 (19:19 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 2 Jun 2023 17:19:40 +0000 (19:19 +0200)
resources/linkeditor/js/linkeditor.resize.js

index 9d93171ffd4a9b8b77eff30cdaa15fe862a01fda..f0f0b2a8d0a3e3808baf448bc69ea0a4798982d9 100644 (file)
@@ -46,12 +46,18 @@ LinkeditorResize.prototype = {
     resizePages: function () {
         let $this = this;
         let dimCover = $this.linkeditor.utils.getPageDimensions(1);
+        let pw;
+        let ph;
 
         $(".linkeditor-page[data-page]").each(function () {
             let p = $(this).attr('data-page');
             let dim = $this.linkeditor.utils.getPageDimensions(p);
-            let pw = dim[0];
-            let ph = dim[1];
+            if (dim === undefined) {
+                dim = dimCover;
+            }
+            pw = dim[0];
+            ph = dim[1];
+
             if ($this.linkeditor.utils.isSpecialPage(p)) {
 
             } else if ($this.linkeditor.mobileFirst) {
@@ -60,10 +66,16 @@ LinkeditorResize.prototype = {
                 pw = dimCover[0];
                 ph = dimCover[1];
             }
-            $("#linkeditor-fluidbook").css({width: pw, height: ph});
             $(this).css({width: pw, height: ph});
         });
 
+        let fw = pw;
+        if (!this.linkeditor.single) {
+            fw *= 2;
+        }
+        $("#linkeditor-page-right").css({left: this.linkeditor.pw});
+        $("#linkeditor-fluidbook").css({width: fw, height: ph});
+
     },
 
     resizeMain: function () {