mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #18393 from Snuffleupagus/mustBeViewedWhenEditing-params
Check the relevant parameters inside of the `mustBeViewedWhenEditing` method
This commit is contained in:
commit
ccb141e211
2 changed files with 3 additions and 4 deletions
|
@ -777,8 +777,8 @@ class Annotation {
|
|||
return this.printable;
|
||||
}
|
||||
|
||||
mustBeViewedWhenEditing() {
|
||||
return !this.data.isEditable;
|
||||
mustBeViewedWhenEditing(isEditing, modifiedIds = null) {
|
||||
return isEditing ? !this.data.isEditable : !modifiedIds?.has(this.data.id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -582,8 +582,7 @@ class Page {
|
|||
intentAny ||
|
||||
(intentDisplay &&
|
||||
annotation.mustBeViewed(annotationStorage, renderForms) &&
|
||||
((isEditing && annotation.mustBeViewedWhenEditing()) ||
|
||||
(!isEditing && !modifiedIds?.has(annotation.data.id)))) ||
|
||||
annotation.mustBeViewedWhenEditing(isEditing, modifiedIds)) ||
|
||||
(intentPrint && annotation.mustBePrinted(annotationStorage))
|
||||
) {
|
||||
opListPromises.push(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue