]> _ Git - fluidbook_tools.git/commitdiff
wait #5515 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 7 Oct 2022 16:42:24 +0000 (18:42 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 7 Oct 2022 16:42:24 +0000 (18:42 +0200)
src/Compiler/Compiler.php
src/Compiler/CompilerInterface.php
src/Links/Link.php

index 29fcfd63d3155b5a1d965070ee535a88d20b6b00..720d84034e4a8d43f231efaf8d18798e0b9f905a 100644 (file)
@@ -325,7 +325,7 @@ class Compiler implements ShouldQueue, ShouldBeUnique, CompilerInterface
     }
 
 
-    public function addTriggersLink($page, $link)
+    public function addTriggersLink($page, $link, $delay = 0)
     {
         // TODO: Implement addTriggersLink() method.
     }
@@ -365,5 +365,4 @@ class Compiler implements ShouldQueue, ShouldBeUnique, CompilerInterface
     }
 
 
-
 }
index ee724e8e1136275dc7f5e1e774e046d0d2facd85..430c64472fced85a5c71a7f2a825412f8e0ccf2e 100644 (file)
@@ -8,7 +8,7 @@ interface CompilerInterface
 {
     public function addContentLock($page, $unlockConditions = '');
 
-    public function addTriggersLink($page, $link);
+    public function addTriggersLink($page, $link, $delay=0);
 
     public function addAudiodescription($link);
 
index a88da5acd50bdd44c3e177138b4919d91cf54be4..baa99151b95d39f5de243cb3f6ece85b53cebdce 100644 (file)
@@ -189,7 +189,9 @@ class Link
                 return new DownloadPortionLink($id, $init, $compiler);
             case 38:
                 if ($init['target'] != 'click') {
-                    $compiler->addTriggersLink($init['page'], $init['to']);
+                    $extras = self::parseExtras($init['extra']);
+                    $delay = $extras['delay'] ?? 0;
+                    $compiler->addTriggersLink($init['page'], $init['to'], $delay);
                 } else {
                     return new TriggerLink($id, $init, $compiler);
                 }