From: Vincent Vanwaelscappel Date: Thu, 18 Jan 2024 15:48:35 +0000 (+0100) Subject: wait #6639 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0a4a4c6605137583f8db296fb1e400bd4a26c0d4;p=fluidbook_tools.git wait #6639 @2 --- diff --git a/src/Jobs/ProcessFile.php b/src/Jobs/ProcessFile.php index e987400..867a0a8 100644 --- a/src/Jobs/ProcessFile.php +++ b/src/Jobs/ProcessFile.php @@ -275,6 +275,7 @@ class ProcessFile $inter = str_replace('/to', '/tp', $out); PDFTools::makeTextSVGFile($in, $inter); SVGTools::optimizeSVG($inter, $out); + } public function getResolutionRatio(): float diff --git a/src/Links/HTMLMultimediaLink.php b/src/Links/HTMLMultimediaLink.php index 8157809..090d100 100644 --- a/src/Links/HTMLMultimediaLink.php +++ b/src/Links/HTMLMultimediaLink.php @@ -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();