]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6753 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 27 Feb 2024 11:03:59 +0000 (12:03 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 27 Feb 2024 11:03:59 +0000 (12:03 +0100)
app/Fluidbook/Compiler/Tabs.php

index 4be7cf0268f57552cfd5d152738b3b4534ad67e9..6a33d201e273042c32f2db64b5086ab8005cf1a5 100644 (file)
@@ -52,14 +52,13 @@ trait Tabs
 
 
         $svg = $this->wdir . '/' . $this->fluidbookSettings->tabsHTML5;
-        $opt = SVGTools::optimizeSVG($svg, null, '--trim-ids no --remove-unreferenced-ids no --ungroup-groups no --group-by-style no', true);
-
-        $svgContent = file_get_contents($opt);
-        $svgContent = str_replace('_1_', '', $svgContent, $count);
-        if ($count) {
-            file_put_contents($opt, $svgContent);
-        }
+        $opt = str_replace('.svg', '.o.svg', $this->wdir . '/' . $this->fluidbookSettings->tabsHTML5);
 
+        $svgContent = file_get_contents($svg);
+        $svgContent = str_replace('_1_', '', $svgContent);
+        $svgContent = str_replace('xmlns:xlink="http://www.w3.org/1999/xlink"', '',$svgContent);
+        $svgContent = SVGTools::addDimensionsAttributes($svgContent);
+        file_put_contents($opt, $svgContent);
 
         $this->vdir->copy($opt, 'data/tabs.svg');
         $this->config->svgTabs = true;