-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix disabled annotation edition in view only files
When a PDF file was shared without edit permissions the annotation editor buttons were hidden in the toolbar. Besides being a dirty trick, it only prevented creating new annotations, but not editing existing ones. Now the parameter "annotationEditorMode" of PDF.js set to "AnnotationEditorType.DISABLE" is used instead, which properly disables editing annotations and also takes care of removing the buttons from the toolbar if needed. Note that the editor mode separator is no longer hidden; it was hidden back in the day when edition was not supported yet in the PDF viewer, and once edition was added it should have been shown whenever the editor buttons were shown, but it was not the case. Now it is shown by default and hidden as needed by PDF.js itself when annotation edition is disabled. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
- Loading branch information
Showing
4 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters