mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[GeckoView] Reduce the size of the *built* viewer
Given that the GV-viewer isn't using most of the UI-related components of the default-viewer, we can avoid including them in the *built* viewer to save space.[1] The least "invasive" way of implementing this, at least that I could come up with, is to leverage import maps with suitable stubs for the GV-viewer. The one slightly annoying thing is that we now have larger import maps across multiple html-files, and you'll need to remember to update all of them when making future changes. --- [1] With this patch, the built `viewer.js` size is 391 kB and `viewer-geckoview.js` is 285 kB.
This commit is contained in:
parent
05d821e680
commit
a98e80c4ff
10 changed files with 150 additions and 34 deletions
|
@ -13,15 +13,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { CursorTool, PresentationModeState } from "./ui_utils.js";
|
||||
import { AnnotationEditorType } from "pdfjs-lib";
|
||||
import { GrabToPan } from "./grab_to_pan.js";
|
||||
import { PresentationModeState } from "./ui_utils.js";
|
||||
|
||||
const CursorTool = {
|
||||
SELECT: 0, // The default value.
|
||||
HAND: 1,
|
||||
ZOOM: 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* @typedef {Object} PDFCursorToolsOptions
|
||||
|
@ -175,4 +169,4 @@ class PDFCursorTools {
|
|||
}
|
||||
}
|
||||
|
||||
export { CursorTool, PDFCursorTools };
|
||||
export { PDFCursorTools };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue