From 042c591ba0b1162949d9ce9b58fee9e7113ec4e7 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 15 Oct 2021 09:20:42 +0200 Subject: [PATCH] wip #4793 @0.25 --- src/Compiler/Links.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/Compiler/Links.php b/src/Compiler/Links.php index 73b8f25..8b15790 100644 --- a/src/Compiler/Links.php +++ b/src/Compiler/Links.php @@ -73,18 +73,20 @@ trait Links foreach ($linksCopy as $k => $linkData) { if ($linkData['type'] == 35 || $linkData['type'] == 15 || $linkData['type'] == 39) { $linkData = Link::decryptLink($linkData); - $animations = ContentLink::parseAnimations($linkData['image_rollover']); - foreach ($animations as $animation) { - if (isset($animation['backgroundcolor']) && $animation['backgroundcolor'] !== 'transparent') { - $dupData = $linkData; - $dupData['type'] = 14; - $dupData['to'] = $animation['backgroundcolor']; - - $dupData['uid'] = 'b_' . $linkData['uid']; - $dupData['image_rollover'] = 'addzindex=-1'; - $links[] = $dupData; - $links[] = $linkData; - unset($links[$k]); + if (isset($linkData['image_rollover']) && $linkData['image_rollover']) { + $animations = ContentLink::parseAnimations($linkData['image_rollover']); + foreach ($animations as $animation) { + if (isset($animation['backgroundcolor']) && $animation['backgroundcolor'] !== 'transparent') { + $dupData = $linkData; + $dupData['type'] = 14; + $dupData['to'] = $animation['backgroundcolor']; + + $dupData['uid'] = 'b_' . $linkData['uid']; + $dupData['image_rollover'] = 'addzindex=-1'; + $links[] = $dupData; + $links[] = $linkData; + unset($links[$k]); + } } } } @@ -262,7 +264,7 @@ trait Links } $link = ['uid' => self::makeUID()]; - $cols = ['page' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'type' => '', 'to' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'infobulle' => '', 'numerotation' => 'physical', "inline" => true]; + $cols = ['page' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'type' => '', 'to' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'infobulle' => '', 'image_rollover' => '', 'numerotation' => 'physical', "inline" => true]; $k = 0; -- 2.39.5