Skip to content
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

Options windowSize and captureSelector do not work together #127

Open
maksim-zhuk opened this issue Dec 11, 2015 · 2 comments
Open

Options windowSize and captureSelector do not work together #127

maksim-zhuk opened this issue Dec 11, 2015 · 2 comments

Comments

@maksim-zhuk
Copy link

When captureSelector option is set, windowSize is being ignored. It would be nice to have an option to specify a block selector and limit an output image with windowSize/shotSize parameters.

@nicholasblexrud
Copy link
Contributor

@maksim-zhuk this might be an issue with phantomjs. Take a look at this issue in phantom js and let me know if it is the same issue as you're describing: Render not honoring viewport size.

@maksim-zhuk
Copy link
Author

@nicholasblexrud Don't think these are related.
Both _ captureSelector_ and _ windowSize_ options work perfectly well, my point is that they do not work properly together.

Imagine like when you open any image in a browser, limit the browser's visible area to the half of an image and make a snapshot. The captured result would be only the visible part of an image.
Same is here: when range of captureSelector is calculated it should be cropped to windowSize before being passed to renderer.

P.S. I might be conceptually wrong and when captureSelector option is set then no other size-related options (windowSize, shotSize , shotOffset) should take effect, but in this case it might make sense to describe this behavior in docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants