From 9277c84e0fc1faf013d143f5d86c53abcf3667b6 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 2 Jun 2023 19:19:40 +0200 Subject: [PATCH] wait #5985 @0.5 --- resources/linkeditor/js/linkeditor.resize.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/resources/linkeditor/js/linkeditor.resize.js b/resources/linkeditor/js/linkeditor.resize.js index 9d93171ff..f0f0b2a8d 100644 --- a/resources/linkeditor/js/linkeditor.resize.js +++ b/resources/linkeditor/js/linkeditor.resize.js @@ -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 () { -- 2.39.5