From 6a23728b1b97889bec1bebe5504eb28c7c5c2588 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 10 May 2023 13:55:08 +0200 Subject: [PATCH] wait #5925 @1 --- src/Links/ZoomLink.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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; -- 2.39.5