Skip to content

Commit

Permalink
Upgrade pdfjs-dist to 4.3.136
Browse files Browse the repository at this point in the history
  • Loading branch information
Gagaro committed Jun 7, 2024
1 parent 89aedc5 commit 402a836
Show file tree
Hide file tree
Showing 11 changed files with 28,547 additions and 844 deletions.
14 changes: 7 additions & 7 deletions frontend/DocumentEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ import "pdfjs-dist/web/pdf_viewer.css";
import type {PDFPageView} from "pdfjs-dist/types/web/pdf_page_view";
import type {FileUpload, TokenReponse} from "./interfaces";

pdfjs.GlobalWorkerOptions.workerSrc = '/static/pdfjs/pdf.worker.min.js';
pdfjs.GlobalWorkerOptions.workerSrc = '/static/pdfjs/pdf.worker.min.mjs';

/**
* TODO: Existing annotations cannot be edited, so watch for https://github.com/mozilla/pdf.js/issues/15403
Expand Down Expand Up @@ -271,12 +271,12 @@ export default defineComponent({
},
zoomIn() {
const viewer = this.viewer as PDFViewer;
viewer.increaseScale({scaleFactor: 1.1});
viewer.updateScale({scaleFactor: 1.1});
this.currentZoom = viewer.currentScale.toString();
},
zoomOut() {
const viewer = this.viewer as PDFViewer;
viewer.decreaseScale({scaleFactor: 1.1});
viewer.updateScale({scaleFactor: 0.9});
this.currentZoom = viewer.currentScale.toString();
},
setScale(scale: string) {
Expand All @@ -298,7 +298,7 @@ export default defineComponent({
this.highlightingColor = color;
if (color) {
this.startWatchingAnnotations();
viewer.annotationEditorMode = AnnotationEditorType.INK;
viewer.annotationEditorMode = {mode: AnnotationEditorType.INK};
viewer.annotationEditorParams = {
type: AnnotationEditorParamsType.INK_THICKNESS,
value: 10,
Expand All @@ -313,7 +313,7 @@ export default defineComponent({
};
} else {
this.stopWatchingAnnotations();
viewer.annotationEditorMode = AnnotationEditorType.NONE;
viewer.annotationEditorMode = {mode: AnnotationEditorType.NONE};
}
},
setCommenting(color: string) {
Expand All @@ -322,7 +322,7 @@ export default defineComponent({
this.commentingColor = color;
if (color) {
this.startWatchingAnnotations();
viewer.annotationEditorMode = AnnotationEditorType.FREETEXT;
viewer.annotationEditorMode = {mode: AnnotationEditorType.FREETEXT};
viewer.annotationEditorParams = {
type: AnnotationEditorParamsType.FREETEXT_SIZE,
value: 10,
Expand All @@ -333,7 +333,7 @@ export default defineComponent({
};
} else {
this.stopWatchingAnnotations();
viewer.annotationEditorMode = AnnotationEditorType.NONE;
viewer.annotationEditorMode = {mode: AnnotationEditorType.NONE};
}
},
updateNeedsToBeSaved() {
Expand Down

Large diffs are not rendered by default.

301 changes: 290 additions & 11 deletions osis_document/static/osis_document/osis-document-editor.umd.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions osis_document/static/osis_document/osis-document.umd.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions osis_document/static/pdfjs/pdf.worker.min.js

This file was deleted.

21 changes: 21 additions & 0 deletions osis_document/static/pdfjs/pdf.worker.min.mjs

Large diffs are not rendered by default.

Loading

0 comments on commit 402a836

Please sign in to comment.