From 0a82f6fb2a99d83fb4d9cfb8f81480100c39173c Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 17 Feb 2022 10:43:41 +0100 Subject: [PATCH] wip #5084 @0.5 --- app/Jobs/ProcessFluidbook.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/Jobs/ProcessFluidbook.php b/app/Jobs/ProcessFluidbook.php index 37e353a..cd7b87a 100644 --- a/app/Jobs/ProcessFluidbook.php +++ b/app/Jobs/ProcessFluidbook.php @@ -140,12 +140,13 @@ class ProcessFluidbook extends Compiler $links = $this->getLinksFromPDF(); $this->config->mediaIDToFile = []; $res = []; + foreach ($links as $k => $link) { $e = explode(':', $link['to']); $ee = explode('/', $e[0]); if ($ee[0] == 'anim') { - $base = [['ease' => 'Power2.easeOut', 'duration' => 1.5, 'backgroundColor' => '#ffffff', 'transformOrigin' => 'center', 'delay' => 1], []]; + $base = [['type'=>'','ease' => 'Power2.easeOut', 'duration' => 1.5, 'transformOrigin' => 'center', 'delay' => 1], []]; switch ($ee[1]) { case 'fadein': $link['type'] = 14; @@ -188,14 +189,13 @@ class ProcessFluidbook extends Compiler $anim = ''; foreach ($base as $item) { - if (!count($item)) { - continue; - } - foreach ($item as $k => $v) { - $anim .= $k . '=' . $v . "\n"; + foreach ($item as $param => $value) { + $anim .= $param . '=' . $value . "\n"; } $anim .= '---' . "\n"; } + $anim = trim($anim, " \t\n\r\0\x0B-"); + $link['image_rollover'] = $anim; } else if ($e[0] === 'pdf') { $cc = explode('#', $e[1]); @@ -231,7 +231,6 @@ class ProcessFluidbook extends Compiler } $res[$k] = $link; } - return $res; } -- 2.39.5