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

index 73b8f25e5fbee326878d9a0338b1174565812cf3..8b157903a4216586ff8d00be9914c98caffca488 100644 (file)
@@ -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;