Uh oh!
There was an error while loading. Please reload this page.
[ready for review] Snapfile refactor - #439
Conversation
micros123
commented
Jul 19, 2016
@ChrisBAshton Dynamic heights would be a great addition! But despite having built a Gem from your 'refactor' branch, screenshots keep defaulting to 1500px height. Any ideas on why it might not be able to detect the height? (We are using PhantomJS) |
ChrisBAshton
commented
Jul 19, 2016
Thanks for the feedback @micros123 , that's really useful. To help debug this, could you add |
chrowe
commented
Jan 11, 2017
I tested this and it seemed to be working. I didn't have to change anything in my configs yaml file. All I did was install the a new gem based on the branch and run wraith with my current config. Install steps |
rithipooh
commented
Feb 27, 2017
Hello, My friend and colleague found a wonderful solution to this issue. All we had to do was reduce the default height in helper.js to 100 instead of 1500 px in the function getWidthAndHeight(), and comment the line page.clipRect in Phantom.js to prevent setting the height. The code then takes the rendered height of the page for the screenshot!!! Try out and let us know how it works out... |
This PR significantly refactors the snapfile JavaScript (particularly for Phantom) and addresses issue #318.
Once merged, this should allow users to configure Wraiths without having to specify a height, whether they use PhantomJS or CasperJS.
Note: users with Wraith configurations where JavaScript is disabled will still have the issue, since Wraith has no way of determining the height of the document.
Before merging: