Remove the ability to pass a scale
parameter in the (optional) args
object parameter of PDFViewerApplication.open(file, args)
#8820
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since the very early days of the viewer, it's been possible to pass in a
scale
when opening a PDF file. However, most of the time it was/is actually being ignored, which limits its usefulness considerably.In older versions of the viewer, if a document hash was present (i.e.
PDFViewerApplication.initialBookmark
being set) or if the document existed in theViewHistory
, thescale
passed toPDFViewerApplication.open
would thus always be ignored.In addition to the above, in the current viewer there's even more cases where the
scale
parameter will be ignored: if a (valid) browser history entry exists on document load, or if thedefaultZoomValue
preference is set to a non-default value.Hence the result is that in most situation, a
scale
passed toPDFViewerApplication.open
will be completely ignored.A much better, not to mention supported, way of setting the initial scale is by using the
defaultZoomLevel
preference. In comparision, this also has the advantage of being used in situations where thescale
would be ignored.All in all this leads to the current situation where we have code which is essentially dead, since no part of the viewer (by default) relies on it.
To clean up this code, and to avoid having to pass (basically) unused parameters around, I'd thus like to remove the ability to pass a
scale
toPDFViewerApplication.open
.