]> _ Git - fluidbook_tools.git/commitdiff
wait #6639 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Jan 2024 15:48:35 +0000 (16:48 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Jan 2024 15:48:35 +0000 (16:48 +0100)
src/Jobs/ProcessFile.php
src/Links/HTMLMultimediaLink.php

index e987400d7506d1ca5b30dee4f9699a0b8fdc043c..867a0a86f335e4f23a56b622f63a787f459c9547 100644 (file)
@@ -275,6 +275,7 @@ class ProcessFile
         $inter = str_replace('/to', '/tp', $out);
         PDFTools::makeTextSVGFile($in, $inter);
         SVGTools::optimizeSVG($inter, $out);
+
     }
 
     public function getResolutionRatio(): float
index 81578094585ae0cf80a1c02457db40cb6f34e96e..090d10026b044f35ad6b402e9afc7b33d897461a 100644 (file)
@@ -5,6 +5,7 @@ namespace Fluidbook\Tools\Links;
 use Cubist\Util\CSS;
 use Cubist\Util\Files\Files;
 use Cubist\Util\Json;
+use Illuminate\Support\Facades\Log;
 
 class HTMLMultimediaLink extends Link
 {
@@ -138,6 +139,10 @@ class HTMLMultimediaLink extends Link
 
     protected function _getCSSContainer()
     {
+        if (!isset($this->_config['type'])) {
+            return;
+        }
+
         if ($this->moveOnEvenPage()) {
             $this->page--;
             $this->left += $this->compiler->width;
@@ -181,13 +186,16 @@ class HTMLMultimediaLink extends Link
             }
 
         }
-
-
         return $css;
     }
 
     public function getCSS()
     {
+        if (!isset($this->_config['width'])) {
+            Log::warning('missing width on link ' . $this->uid . ' (page ' . $this->page . ')');
+            return;
+        }
+
         $sx = ($this->width / ($this->_config['width'])) * $this->getCssScale();
         $sy = ($this->height / ($this->_config['height'])) * $this->getCssScale();