From: Vincent Vanwaelscappel Date: Wed, 10 May 2023 11:55:08 +0000 (+0200) Subject: wait #5925 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6a23728b1b97889bec1bebe5504eb28c7c5c2588;p=fluidbook_tools.git wait #5925 @1 --- diff --git a/src/Links/ZoomLink.php b/src/Links/ZoomLink.php index 08d86b5..2cf6806 100644 --- a/src/Links/ZoomLink.php +++ b/src/Links/ZoomLink.php @@ -118,11 +118,6 @@ class ZoomLink extends NormalLink { $h = $attributes['height']; $bookwidth = $compiler->getWidthForLinks(); - if ($compiler->isDoublePage() && $x >= $bookwidth) { - $x -= $bookwidth; - $attributes['page']++; - } - if (!isset($attributes['pdf']) || !$attributes['pdf']) { $pdfpath = $compiler->getPagePDFSource($attributes['page']); $extractPage = 1; @@ -139,7 +134,7 @@ class ZoomLink extends NormalLink { $leftArea, null, $extractOptions, $cache); - if (($x + $w) >= $bookwidth && $compiler->isDoublePage()) { + if ($attributes['page'] % 2 === 0 && ($x + $w) > ($bookwidth + 1) && $compiler->isDoublePage()) { if (!isset($attributes['pdf']) || !$attributes['pdf']) { $pdfpath = $compiler->getPagePDFSource($attributes['page'] + 1); $extractPage = 1;