]> _ Git - fluidbook_tools.git/commitdiff
wait #5890 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 27 Apr 2023 14:20:44 +0000 (16:20 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 27 Apr 2023 14:20:44 +0000 (16:20 +0200)
src/Links/LayerLink.php
src/Links/ZoomLink.php

index 0e1891b7224a012a594a5f8057d3a6de3f66f105..df2e7cd82271dbecfb7b1c69e427b9588f6836cf 100644 (file)
@@ -2,34 +2,31 @@
 
 namespace Fluidbook\Tools\Links;
 
-class LayerLink extends ImageLink
-{
+use Illuminate\Support\Facades\Log;
+
+class LayerLink extends ImageLink {
     protected $maxzoom_default = 4;
     public $defaultZIndex = 31;
 
-    public function ignore()
-    {
+    public function ignore() {
         return parent::ignore() || $this->isOutsidePage();
     }
 
     /**
      * @throws \Exception
      */
-    public function getCSS()
-    {
+    public function getCSS() {
         $attributes = $this->getZoomAttributes();
         if (!$this->rightClone) {
             ZoomLink::generateImage($attributes, $this->compiler, 'layerlink', 'layer');
         }
     }
 
-    public function getImageUrl()
-    {
+    public function getImageUrl() {
         return 'data/links/layer_' . $this->uid . '.jpg';
     }
 
-    public function getZoomAttributes()
-    {
+    public function getZoomAttributes() {
         return [
             'id' => $this->uid,
             'page' => $this->page,
index c1b6fc02070b89ec57ea95de5a7992824c076170..53c70cb15eaa1426c06b715ede88117adcba8790 100644 (file)
@@ -117,7 +117,7 @@ class ZoomLink extends NormalLink {
         $y = $attributes['y'];
         $w = $attributes['width'];
         $h = $attributes['height'];
-        $bookwidth = round($compiler->getSetting('width'));
+        $bookwidth = round($compiler->getWidthForLinks());
 
         if (!isset($attributes['pdf']) || !$attributes['pdf']) {
             $pdfpath = $compiler->getPagePDFSource($attributes['page']);
@@ -134,6 +134,7 @@ class ZoomLink extends NormalLink {
             array('x' => $x, 'y' => $y, 'width' => $w, 'height' => $h),
             null, $extractOptions, $cache);
 
+
         if (($x + $w) > $bookwidth && !$compiler->isOnePage()) {
             if (!isset($attributes['pdf']) || !$attributes['pdf']) {
                 $pdfpath = $compiler->getPagePDFSource($attributes['page'] + 1);