Merge pull request #18394 from Snuffleupagus/rm-annotation-getOperatorList-renderForms
Remove the `renderForms` parameter from the Annotation `getOperatorList` methods
This commit is contained in:
commit
cf9dfbc084
@ -1105,13 +1105,7 @@ class Annotation {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async getOperatorList(
|
async getOperatorList(evaluator, task, intent, annotationStorage) {
|
||||||
evaluator,
|
|
||||||
task,
|
|
||||||
intent,
|
|
||||||
renderForms,
|
|
||||||
annotationStorage
|
|
||||||
) {
|
|
||||||
const { hasOwnCanvas, id, rect } = this.data;
|
const { hasOwnCanvas, id, rect } = this.data;
|
||||||
let appearance = this.appearance;
|
let appearance = this.appearance;
|
||||||
const isUsingOwnCanvas = !!(
|
const isUsingOwnCanvas = !!(
|
||||||
@ -1959,17 +1953,11 @@ class WidgetAnnotation extends Annotation {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getOperatorList(
|
async getOperatorList(evaluator, task, intent, annotationStorage) {
|
||||||
evaluator,
|
|
||||||
task,
|
|
||||||
intent,
|
|
||||||
renderForms,
|
|
||||||
annotationStorage
|
|
||||||
) {
|
|
||||||
// Do not render form elements on the canvas when interactive forms are
|
// Do not render form elements on the canvas when interactive forms are
|
||||||
// enabled. The display layer is responsible for rendering them instead.
|
// enabled. The display layer is responsible for rendering them instead.
|
||||||
if (
|
if (
|
||||||
renderForms &&
|
intent & RenderingIntentFlag.ANNOTATIONS_FORMS &&
|
||||||
!(this instanceof SignatureWidgetAnnotation) &&
|
!(this instanceof SignatureWidgetAnnotation) &&
|
||||||
!this.data.noHTML &&
|
!this.data.noHTML &&
|
||||||
!this.data.hasOwnCanvas
|
!this.data.hasOwnCanvas
|
||||||
@ -1982,13 +1970,7 @@ class WidgetAnnotation extends Annotation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this._hasText) {
|
if (!this._hasText) {
|
||||||
return super.getOperatorList(
|
return super.getOperatorList(evaluator, task, intent, annotationStorage);
|
||||||
evaluator,
|
|
||||||
task,
|
|
||||||
intent,
|
|
||||||
renderForms,
|
|
||||||
annotationStorage
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const content = await this._getAppearance(
|
const content = await this._getAppearance(
|
||||||
@ -1998,13 +1980,7 @@ class WidgetAnnotation extends Annotation {
|
|||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
if (this.appearance && content === null) {
|
if (this.appearance && content === null) {
|
||||||
return super.getOperatorList(
|
return super.getOperatorList(evaluator, task, intent, annotationStorage);
|
||||||
evaluator,
|
|
||||||
task,
|
|
||||||
intent,
|
|
||||||
renderForms,
|
|
||||||
annotationStorage
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const opList = new OperatorList();
|
const opList = new OperatorList();
|
||||||
@ -2934,13 +2910,7 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getOperatorList(
|
async getOperatorList(evaluator, task, intent, annotationStorage) {
|
||||||
evaluator,
|
|
||||||
task,
|
|
||||||
intent,
|
|
||||||
renderForms,
|
|
||||||
annotationStorage
|
|
||||||
) {
|
|
||||||
if (this.data.pushButton) {
|
if (this.data.pushButton) {
|
||||||
return super.getOperatorList(
|
return super.getOperatorList(
|
||||||
evaluator,
|
evaluator,
|
||||||
@ -2962,13 +2932,7 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
|
|||||||
if (value === null && this.appearance) {
|
if (value === null && this.appearance) {
|
||||||
// Nothing in the annotationStorage.
|
// Nothing in the annotationStorage.
|
||||||
// But we've a default appearance so use it.
|
// But we've a default appearance so use it.
|
||||||
return super.getOperatorList(
|
return super.getOperatorList(evaluator, task, intent, annotationStorage);
|
||||||
evaluator,
|
|
||||||
task,
|
|
||||||
intent,
|
|
||||||
renderForms,
|
|
||||||
annotationStorage
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value === null || value === undefined) {
|
if (value === null || value === undefined) {
|
||||||
@ -3001,7 +2965,6 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
|
|||||||
evaluator,
|
evaluator,
|
||||||
task,
|
task,
|
||||||
intent,
|
intent,
|
||||||
renderForms,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
this.appearance = savedAppearance;
|
this.appearance = savedAppearance;
|
||||||
|
|||||||
@ -592,7 +592,6 @@ class Page {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
intent,
|
intent,
|
||||||
renderForms,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
)
|
)
|
||||||
.catch(function (reason) {
|
.catch(function (reason) {
|
||||||
|
|||||||
@ -1768,7 +1768,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
expect(opList.argsArray.length).toEqual(3);
|
expect(opList.argsArray.length).toEqual(3);
|
||||||
@ -2523,7 +2522,6 @@ describe("annotation", function () {
|
|||||||
checkboxEvaluator,
|
checkboxEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
expect(opList.argsArray.length).toEqual(5);
|
expect(opList.argsArray.length).toEqual(5);
|
||||||
@ -2584,7 +2582,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
expect(opList1.argsArray.length).toEqual(3);
|
expect(opList1.argsArray.length).toEqual(3);
|
||||||
@ -2608,7 +2605,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
expect(opList2.argsArray.length).toEqual(3);
|
expect(opList2.argsArray.length).toEqual(3);
|
||||||
@ -2670,7 +2666,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
expect(opList.argsArray.length).toEqual(3);
|
expect(opList.argsArray.length).toEqual(3);
|
||||||
@ -2732,7 +2727,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
expect(opList.argsArray.length).toEqual(3);
|
expect(opList.argsArray.length).toEqual(3);
|
||||||
@ -2986,7 +2980,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
expect(opList1.argsArray.length).toEqual(3);
|
expect(opList1.argsArray.length).toEqual(3);
|
||||||
@ -3010,7 +3003,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
expect(opList2.argsArray.length).toEqual(3);
|
expect(opList2.argsArray.length).toEqual(3);
|
||||||
@ -3070,7 +3062,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
annotationStorage
|
annotationStorage
|
||||||
);
|
);
|
||||||
expect(opList.argsArray.length).toEqual(3);
|
expect(opList.argsArray.length).toEqual(3);
|
||||||
@ -4242,7 +4233,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4503,7 +4493,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4672,7 +4661,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4791,7 +4779,6 @@ describe("annotation", function () {
|
|||||||
partialEvaluator,
|
partialEvaluator,
|
||||||
task,
|
task,
|
||||||
RenderingIntentFlag.PRINT,
|
RenderingIntentFlag.PRINT,
|
||||||
false,
|
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user