-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ready for review] Snapfile refactor #439
base: master
Are you sure you want to change the base?
Conversation
@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) |
Thanks for the feedback @micros123 , that's really useful. To help debug this, could you add |
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
|
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: