diff --git a/lib/webshot.phantom.js b/lib/webshot.phantom.js index 7147cdb..f9c04f6 100644 --- a/lib/webshot.phantom.js +++ b/lib/webshot.phantom.js @@ -79,6 +79,16 @@ var _takeScreenshot = function(status) { return; } + //Work around for parallax scrolling effects + var pageHeight = page.evaluate(function() { + return document.body.scrollHeight; + }); + + page.viewportSize = { + width: page.viewportSize.width, + height: pageHeight + } + // Wait `options.renderDelay` seconds for the page's JS to kick in window.setTimeout(function () {