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
Fix zoom after export to PDF is done #9237
Conversation
examples/export-pdf.js
Outdated
@@ -64,6 +65,7 @@ exportButton.addEventListener('click', function() { | |||
// Reset original map size | |||
map.setSize(size); | |||
map.getView().fit(extent, {size}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be enough to just change this line to
map.getView().fit(extent, {
size: size,
constrainResolution: false
});
Then you could remove the rest of the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally right. Just provided your suggestion in the commit. Thanks.
If you format your code like in the snippet I provided, the CI will be happy. You can also test locally by running |
Just did it, thanks for making me discover lint! |
Thanks @umbe1987. |
With pleasure ;) |
This should fix #9235