]> _ Git - fluidbook_tools.git/commitdiff
wip #4793
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Oct 2021 07:45:06 +0000 (09:45 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Oct 2021 07:45:06 +0000 (09:45 +0200)
src/Compiler/Compiler.php
src/Links/Link.php
src/Links/SlideshowLink.php

index bc78d8b2f4cc01c42a878fc6b1a4a7e91949272a..6d3a8642ff8de447869befdd9dce54074f9ba8f9 100644 (file)
@@ -71,6 +71,11 @@ class Compiler implements ShouldQueue, ShouldBeUnique
         }
     }
 
+    public function getVirtualDirectory()
+    {
+        return $this->vdir;
+    }
+
 
     /**
      * Execute the job.
index 4af24ccedd69eb4a2f7cc2dae2674775abcb9984..0924700e7fcbb993147207358d7c7db446cd7c5c 100644 (file)
@@ -67,7 +67,7 @@ class Link
 
     /**
      *
-     * @var wsHTML5Compiler
+     * @var Compiler
      */
     public $compiler;
 
index 3ba4b1c448813834beea92d31558fc929cf93c72..32c6ece5acee4fec02a5a74e1994f8c000d03c40 100644 (file)
@@ -25,7 +25,7 @@ class SlideshowLink extends NormalLink
         $this->copyExternalDir($d['dir'], $d['fdir']);
 
         $this->path = $d['fdir'];
-        $this->path_absolute = $this->compiler->vdir->path($d['fdir']);
+        $this->path_absolute = $this->compiler->getVirtualDirectory()->path($d['fdir']);
 
         return '#/slideshow/' . $this->uid;
     }
@@ -163,7 +163,7 @@ class SlideshowLink extends NormalLink
         $res .= '<ul class="splide__list">';
 
         foreach ($slides as $slide) {
-            $image_path_relative = $this->compiler->vdir->relativePath($slide['path']);
+            $image_path_relative = $this->compiler->getVirtualDirectory()->relativePath($slide['path']);
             $image_info = Image::getimagesize($slide['path']);
             $image_info_json = ($image_info) ? json_encode(['width' => $image_info[0], 'height' => $image_info[1], 'ratio' => round($image_info[0] / $image_info[1], 4)]) : '';
             $image_dimensions = ($image_info) ? $image_info[3] : '';