-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
Add new method to set layout-based zoom level limit #8041
Conversation
* `minimumLevel` Number | ||
* `maximumLevel` Number | ||
|
||
Sets the maximum and minimum layout-based (i.e. non-visual only) zoom level. In |
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.
Perhaps this change should be documented in
// Replace with |
Any feels about changing the current method to accept a third wv.setZoomLevelLimits(0, 3, 'layout'); // new behavior
wv.setZoomLevelLimits(1, 2, 'visual'); // default behavior if unspecified |
@kevinsawicki Feels a little weird to me but if you think it's better I'm okay with that |
I pushed a few changes to this branch:
|
The current behavior of
setZoomLevelLimits
affects the visual-based zoom (i.e. no layout changes) despite all of the rest of the methods affecting layout-based zoom. While this zoom survives in-page navigations such as iframes being loaded, it also causes pages to be cut-off.The ideal fix for this would to be to just change the behavior of this method but that would be a breaking change. This PR introduces a new zoom level limit method to limit layout-based zoom.
This allows you to work around #6958 by doing the following:
Refs #6958