From: Vincent Vanwaelscappel Date: Tue, 15 Apr 2025 15:32:34 +0000 (+0200) Subject: #7459 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=da099709bce1d6a1a7766deb2f64e2c2a410b25e;p=fluidbook_tools.git #7459 --- diff --git a/src/Links/Link.php b/src/Links/Link.php index 70fda39..0a4773a 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -135,6 +135,7 @@ class Link public $cursor = ''; public $blinkdelay = 0; public $stats = []; + public $visibility_os = 'all'; protected $role = 'button'; @@ -223,7 +224,7 @@ class Link $init['inline'] = self::normalizeInlineIntegration($init['inline'] ?? ''); if ($init['inline'] === 'popup') { return new Object3DPopupLink($id, $init, $compiler); - }else{ + } else { return new Object3DLink($id, $init, $compiler); } case static::ACTION: @@ -342,7 +343,7 @@ class Link case static::COPY_TO_CLIPBOARD: return new CopyToClipboardLink($id, $init, $compiler); case static::PAGE_BACKGROUND_COLOR: - $compiler->addPageBackground($init['page'], $init['to'] ?? '', $init['extra'] ?? '',$init['alternative']??''); + $compiler->addPageBackground($init['page'], $init['to'] ?? '', $init['extra'] ?? '', $init['alternative'] ?? ''); break; default: return null; @@ -541,6 +542,11 @@ class Link $this->$k = $v; } + if (!$this->visibility_os) { + $this->visibility_os = 'all'; + } + + if ($this->target == '') { $this->target = '_blank'; } @@ -657,6 +663,9 @@ class Link if ($this->relatedAnimation) { $addContent .= ' data-related-animation="' . $this->relatedAnimation . '"'; } + if ($this->visibility_os !== 'all') { + $addContent .= ' data-visibility-os="' . $this->visibility_os . '"'; + } $attached = $this->attached ? ' data-attached="' . $this->attached . '" ' : ''; return '
' . $this->getHTMLContent() . '
';