Skip to content

Commit

Permalink
Render annotations on canvas without extra HTML in annotation layer
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Jun 10, 2024
1 parent 005bb48 commit 85602c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ import { Preferences } from "web-preferences";
import { SecondaryToolbar } from "web-secondary_toolbar";
import { Toolbar } from "web-toolbar";
import { ViewHistory } from "./view_history.js";
import { AnnotationMode } from '../src/shared/util.js';

const FORCE_PAGES_LOADED_TIMEOUT = 10000; // ms
const WHEEL_ZOOM_DISABLED_TIMEOUT = 1000; // ms
Expand Down Expand Up @@ -452,7 +453,7 @@ const PDFViewerApplication = {
AppOptions.get("enableScripting") && pdfScriptingManager,
l10n,
textLayerMode: AppOptions.get("textLayerMode"),
annotationMode: AppOptions.get("annotationMode"),
annotationMode: AnnotationMode.DISABLE,
annotationEditorMode,
annotationEditorHighlightColors: AppOptions.get("highlightEditorColors"),
enableHighlightFloatingButton: AppOptions.get(
Expand Down
4 changes: 2 additions & 2 deletions web/pdf_page_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1027,9 +1027,9 @@ class PDFPageView {
canvasContext: ctx,
transform,
viewport,
annotationMode: this.#annotationMode,
annotationMode: AnnotationMode.ENABLE_FORMS,
optionalContentConfigPromise: this._optionalContentConfigPromise,
annotationCanvasMap: this._annotationCanvasMap,
// annotationCanvasMap: this._annotationCanvasMap,
pageColors,
};
const renderTask = (this.renderTask = pdfPage.render(renderContext));
Expand Down

0 comments on commit 85602c1

Please sign in to comment.