From: Vincent Vanwaelscappel Date: Wed, 24 May 2023 10:50:19 +0000 (+0200) Subject: fix #5942 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=91c48552aaf9ed66cc0be1dc0821ae5a6f7950da;p=fluidbook-toolbox.git fix #5942 --- diff --git a/app/Models/ToolSVGSprite.php b/app/Models/ToolSVGSprite.php index ed0787f78..6284d9701 100644 --- a/app/Models/ToolSVGSprite.php +++ b/app/Models/ToolSVGSprite.php @@ -33,6 +33,7 @@ class ToolSVGSprite extends ToolboxModel $this->addField('name', Text::class, __('Nom'), ['column' => true]); $this->addField('prefix', Text::class, __('Préfixe'), ['column' => true]); $this->addField('convertColorsToCurrentColor', Checkbox::class, __('Convertir les couleurs en "currentColor"'), ['default' => true]); + $this->addField('fixsvg', Checkbox::class, __('Corriger les SVG'), ['default' => false, 'hint' => __('Peut provoquer des modifications visuelles')]); $this->addField('icons', BunchOfFieldsMultiple::class, __('Icônes'), ['bunch' => ToolSVGSpriteIcon::class, 'edit_label' => __('Éditer :icon :name', ['name' => '%iconname', 'icon' => '
%svgcode
']), 'add_label' => __('Ajouter une icône')]); } @@ -41,7 +42,7 @@ class ToolSVGSprite extends ToolboxModel parent::preSave(); $icons = []; foreach ($this->icons as $k => $icon) { - $icon['svgcode'] = SVGTools::optimizeSVGStr($icon['svgcode'], true); + $icon['svgcode'] = SVGTools::optimizeSVGStr($icon['svgcode'], $this->fixsvg); $icon['iconname'] = Str::slug(mb_strtolower(\Cubist\Util\Text::removeAccents($icon['iconname']))); $icons[$k] = $icon; } diff --git a/resources/views/fluidbook_publication/link_editor.blade.php b/resources/views/fluidbook_publication/link_editor.blade.php index 581a7bb4d..ca2ef37e0 100644 --- a/resources/views/fluidbook_publication/link_editor.blade.php +++ b/resources/views/fluidbook_publication/link_editor.blade.php @@ -190,7 +190,7 @@ name="file"/> -