From: Vincent Vanwaelscappel Date: Fri, 28 Feb 2025 14:51:00 +0000 (+0100) Subject: wip #7347 @3 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a06421d649471c84adaced0303147b2ef311410b;p=fluidbook-toolbox.git wip #7347 @3 --- diff --git a/app/Models/Traits/PublicationSettings.php b/app/Models/Traits/PublicationSettings.php index d004923c8..b7622e90c 100644 --- a/app/Models/Traits/PublicationSettings.php +++ b/app/Models/Traits/PublicationSettings.php @@ -388,20 +388,7 @@ trait PublicationSettings $this->addSettingField('vectorPages', Hidden::class, $this->__('Conserver les pages en vecteur'), [ 'hint' => '1-3,5 = 1,2,3,5', ]); -// $this->addSettingField('visualisationMode', SelectFromArray::class, $this->__('Mode de visualisation 3D'), [ -// -// 'options' => [ -// 0 => $this->__('Mode 3D'), -// 1 => $this->__('Mode 2D (caméra fixe et pages à plat)'), -// 2 => $this->__('Laisser le choix à l\'utilisateur (mode 3D par défaut)'), -// 3 => $this->__('Laisser le choix à l\'utilisateur (mode 2D par défaut)'), -// ], -// 'default' => '3', -// ]); -// $this->addSettingField('antialiasReading', Checkbox::class, $this->__('Amélioration de la lisibilité en mode 2D'), [ -// -// 'default' => true, -// ]); + $this->addSettingField('correctCenter', Checkbox::class, $this->__('Corriger les lignes blanches entre les pages'), [ 'default' => true, 'when' => ['mobileNavigationType' => ['book', 'landscape']], diff --git a/app/SubForms/Link/Base.php b/app/SubForms/Link/Base.php index c60a5bba4..337f8849e 100644 --- a/app/SubForms/Link/Base.php +++ b/app/SubForms/Link/Base.php @@ -61,7 +61,7 @@ class Base extends Form protected static $_acceptLottie = ['.zip', '.html', '.json', '.lottie']; protected static $_acceptSlideshow = ['.jpg', '.jpeg', '.png', '.svg', '.gif', '.zip']; protected static $_acceptPDF = ['.pdf']; - + protected static $_accept3D = ['.3ds', '.fbx']; /** * @return array[] @@ -113,10 +113,11 @@ class Base extends Form ['type' => \Fluidbook\Tools\Links\Link::COPY_TO_CLIPBOARD, 'label' => __('Copier un texte dans le presse-papiers'), 'color' => '#437ac7', 'class' => CopyToClipboard::class], ['type' => \Fluidbook\Tools\Links\Link::PAGE_BACKGROUND_COLOR, 'label' => __('Couleur de fond dynamique') . ' (Fluidbook Air)', 'color' => '#7502DB', 'class' => PageBackgroundColor::class], ['type' => \Fluidbook\Tools\Links\Link::FLUIDBOOK_TOOLBOX_ELEARNING_CONTENT, 'label' => __('Contenu e-learning'), 'color' => '#370f20', 'class' => ElearningContent::class], + ['type' => \Fluidbook\Tools\Links\Link::OBJECT3D, 'label' => __('Objet 3D'), 'color' => '#00ffff', 'class' => Object3D::class], //['type' => \Fluidbook\Tools\Links\Link::HTML5MULTIMEDIA, 'label' => __('Lien Multimédia (HTML)'), 'color' => '#34A853', 'disabled' => true, 'class' => Web::class], //['type' => \Fluidbook\Tools\Links\Link::BOOKMARK_CORNER, 'label' => __('Lien marque-page sur coin de page'), 'color' => '#000000', 'disabled' => true, 'class' => Web::class], //['type' => \Fluidbook\Tools\Links\Link::PAGE_CORNER, 'label' => __('Coin de page'), 'color' => '#f19043', 'disabled' => true, 'class' => Web::class], - //['type' => \Fluidbook\Tools\Links\Link::OBJECT3D, 'label' => __('Objet 3D'), 'color' => '#00ffff', 'disabled' => true, 'class' => Web::class], + ]; usort($res, function ($a, $b) { diff --git a/app/SubForms/Link/Object3D.php b/app/SubForms/Link/Object3D.php new file mode 100644 index 000000000..a85f0ca6b --- /dev/null +++ b/app/SubForms/Link/Object3D.php @@ -0,0 +1,19 @@ +addField('to', FilesOrURL::class, __('Fichier 3D'), $this->getFilesOrURLEntry() + ['accept' => self::$_accept3D]); + } +}