mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Remove the, strictly unnecessary, closure and variable shadowing from createObjectURL
Note that this particular helper function is, with the exception of the `GENERIC` default viewer and the (unsupported) SVG-backend, mostly unused at this point in time. Hence we should be able to clean-up this helper function slightly. Also, fixes a small inconsistency in the `SVGGraphics` initialization in the viewer, by passing in the `disableCreateObjectURL` compatibility-option. Given that the SVG-backend isn't officially supported/recommended this shouldn't have been an issue, but given that I spotted this it can't hurt to fix it.
This commit is contained in:
parent
8b7dee0aae
commit
70d1869fe5
2 changed files with 22 additions and 23 deletions
|
@ -701,7 +701,11 @@ class PDFPageView {
|
|||
const actualSizeViewport = this.viewport.clone({ scale: CSS_UNITS });
|
||||
const promise = pdfPage.getOperatorList().then(opList => {
|
||||
ensureNotCancelled();
|
||||
const svgGfx = new SVGGraphics(pdfPage.commonObjs, pdfPage.objs);
|
||||
const svgGfx = new SVGGraphics(
|
||||
pdfPage.commonObjs,
|
||||
pdfPage.objs,
|
||||
/* forceDataSchema = */ viewerCompatibilityParams.disableCreateObjectURL
|
||||
);
|
||||
return svgGfx.getSVG(opList, actualSizeViewport).then(svg => {
|
||||
ensureNotCancelled();
|
||||
this.svg = svg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue