Skip to content

Commit

Permalink
Following upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-42 committed Nov 8, 2020
1 parent a9e1b85 commit a731636
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/SvgInlineBootstrap.php
Expand Up @@ -73,11 +73,9 @@ public function setPrefix(string $value): void
*
* @return void
*/
protected function setSvgMeasurement(): void
protected function setSvgSize(): void
{
parent::setSvgMeasurement();

[$svgWidth, $svgHeight] = $this->getSvgSize();
parent::setSvgSize();

$width = $this->icon->get('width');
$height = $this->icon->get('height');
Expand All @@ -86,8 +84,9 @@ protected function setSvgMeasurement(): void
Html::addCssClass($this->class, $this->prefix);
$widthClass = $this->icon->get('fixedWidth')
? "{$this->prefix}-fw"
: "{$this->prefix}-w-" . ceil($svgWidth / $svgHeight * 16);
: "{$this->prefix}-w-" . ceil($this->svgWidth / $this->svgHeight * 16);
Html::addCssClass($this->class, $widthClass);
unset($this->svgProperties['width'], $this->svgProperties['height']);
}
}
}

0 comments on commit a731636

Please sign in to comment.