$this->config->vectorPages = array_diff(ArrayUtil::parseRange($this->config->vectorPages), $this->config->rasterizePages);
$this->numerotation = $this->config->numerotation = explode(',', $this->getFluidbook()->page_numbers);
$this->config->dynamicBackgroundColor = [];
+ $this->config->masks = [];
$this->initTabsConfig();
$this->config->hasContentLock = false;
}
+ public function addMask($layer, $page, $area)
+ {
+ $this->config->push('masks', ['layer' => $layer, 'page' => $page, 'area' => $area]);
+ }
+
public function populateConfig()
{
$this->config->id = $this->getFluidbook()->book_id;
['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::LAYER_MASK,'label'=>__('Masque'),'color'=>'#e34f7b','class'=>LayerMask::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],
--- /dev/null
+<?php
+
+namespace App\SubForms\Link;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class LayerMask extends Meta
+{
+ public function addDestinationField()
+ {
+ $this->addField("to", SelectFromArray::class, __('Calque à masquer'), ['ajax' => false, 'options' => ['texts' => __('Textes')], 'default' => 'texts']);
+ parent::addDestinationField();
+ }
+}