]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6950 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 11 Jun 2024 19:22:29 +0000 (21:22 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 11 Jun 2024 19:22:29 +0000 (21:22 +0200)
app/Fluidbook/Compiler/Links.php

index 55cd4560b6da2f89e4d4cd4bf392d5e9397b662a..8d27c375546260d4067b559ee285d68ebbf02d34 100644 (file)
@@ -109,6 +109,16 @@ trait Links
         $linksCopy = $links;
 
         foreach ($linksCopy as $k => $linkData) {
+
+            if ($linkData['type'] == Link::EVENT_OVERLAY) {
+                if ($linkData['page'] % 2 == 1 || $linkData['left'] > $this->getWidthForLinks()) {
+                    $dupData = $linkData;
+                    $dupData['extra'] = 'attachLeft=true';
+                    $dupData['uid'] = 'eo_' . $linkData['uid'];
+                    array_push($links, $dupData);
+                }
+            }
+
             if ($linkData['type'] == Link::LAYER && $linkData['to'] == 'text') {
                 $dupData = $linkData;
                 $dupData['type'] = Link::LAYER;