Skip to content

Commit

Permalink
setHeightToRenderWholePage() width issue (#31)
Browse files Browse the repository at this point in the history
* Update Browsershot.php

Fix width issue when setHeightToRenderWholePage

* Update Browsershot.php

* Update Browsershot.php
  • Loading branch information
c2pdev authored and freekmurze committed Nov 12, 2016
1 parent d4d5e9b commit cd638a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Spatie/Browsershot/Browsershot.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ protected function getPhantomJsScript($targetFile)
var page = require('webpage').create();
page.settings.javascriptEnabled = true;
page.settings.resourceTimeout = ".$this->timeout.';
page.viewportSize = { width: '.$this->width.($this->height == 0 ? '' : ', height: '.$this->height)." };
page.viewportSize = { width: '.$this->width.', height: '.($this->height == 0 ? 1 : $this->height)." };
page.open('{$this->url}', function() {
if (".($this->backgroundColor ? 'true' : 'false').") {
page.evaluate(function() {
Expand Down

0 comments on commit cd638a6

Please sign in to comment.