Просмотр исходного кода

:octocat: remove QROptionsTrait::$svgViewBoxSize (#222)

smiley 2 лет назад
Родитель
Сommit
57448af264
2 измененных файлов с 1 добавлено и 14 удалено
  1. 1 1
      src/Output/QRMarkupSVG.php
  2. 0 13
      src/QROptionsTrait.php

+ 1 - 1
src/Output/QRMarkupSVG.php

@@ -84,7 +84,7 @@ class QRMarkupSVG extends QRMarkup{
 	protected function getViewBox():string{
 		[$width, $height] = $this->getOutputDimensions();
 
-		return sprintf('0 0 %s %s', ($this->options->svgViewBoxSize ?? $width), ($this->options->svgViewBoxSize ?? $height));
+		return sprintf('0 0 %s %s', $width, $height);
 	}
 
 	/**

+ 0 - 13
src/QROptionsTrait.php

@@ -380,19 +380,6 @@ trait QROptionsTrait{
 	 */
 	protected string $svgDefs = '';
 
-	/**
-	 * SVG viewBox size. A single integer number which defines width/height of the viewBox attribute.
-	 *
-	 * viewBox="0 0 x x"
-	 *
-	 * @deprecated 5.0.0 use QRMarkupSVG::getViewBox() instead
-	 * @see        \chillerlan\QRCode\Output\QRMarkupSVG::getViewBox()
-	 *
-	 * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox
-	 * @see https://css-tricks.com/scale-svg/#article-header-id-3
-	 */
-	protected ?int $svgViewBoxSize = null;
-
 	/**
 	 * Sets the value for the "preserveAspectRatio" on the `<svg>` element
 	 *