]> _ Git - fluidbook_tools.git/commitdiff
wait #5925 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 10 May 2023 11:55:08 +0000 (13:55 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 10 May 2023 11:55:08 +0000 (13:55 +0200)
src/Links/ZoomLink.php

index 08d86b5618ef873e1c84ee7ff59749cbe5c0f951..2cf6806526666767e99239b243faff205f457f8d 100644 (file)
@@ -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;