From: Vincent Vanwaelscappel Date: Tue, 23 May 2023 17:58:08 +0000 (+0200) Subject: wip #5940 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c858c61c414027bf3d62ffc642f620623f492417;p=fluidbook_tools.git wip #5940 --- diff --git a/src/Links/Link.php b/src/Links/Link.php index 8d224e2..c9ff149 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -63,7 +63,7 @@ class Link { const LAYER = 39; const ANCHOR = 40; const FLIPCARD = 41; - const PDF=42; + const PDF = 42; protected static string|false|null $_linksKey = null; @@ -123,6 +123,8 @@ class Link { public $allowsAnimation = true; + public $attached = false; + protected static $_encryptedTypes = [14, 15, 35, 39]; protected static $_encryptedAttributes = ['image_rollover']; @@ -264,7 +266,8 @@ class Link { return new DownloadPortionLink($id, $init, $compiler); case 38: if ($init['target'] != 'click') { - $extras = self::parseExtras($init['extra']); + + $extras = isset($init['extra']) ? self::parseExtras($init['extra']) : []; $delay = $extras['delay'] ?? 0; $compiler->addTriggersLink($init['page'], $init['to'], $delay); } else { @@ -529,7 +532,9 @@ class Link { protected function _getHTMLContainer() { $addContent = $this->getAdditionnalContent(); - return '
' . $this->getHTMLContent() . '
'; + + $attached = $this->attached ? ' data-attached="' . $this->attached . '" ' : ''; + return '
' . $this->getHTMLContent() . '
'; } public function getHTMLContainerClass() {