Skip to content

Commit

Permalink
Default to 100% for doc width/height in rasterizer
Browse files Browse the repository at this point in the history
  • Loading branch information
meyfa committed Jan 2, 2017
1 parent 800fef4 commit d002cd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Rasterization/SVGRasterizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@ public function render($rendererId, array $params, SVGNode $context)
*/
public function getDocumentWidth()
{
return SVG::convertUnit($this->docWidth, $this->width);
return SVG::convertUnit($this->docWidth ?: '100%', $this->width);
}

/**
* @return int The original SVG document height, in pixels.
*/
public function getDocumentHeight()
{
return SVG::convertUnit($this->docHeight, $this->height);
return SVG::convertUnit($this->docHeight ?: '100%', $this->height);
}


Expand Down

0 comments on commit d002cd2

Please sign in to comment.