Merge pull request #16856 from Snuffleupagus/limit-lineEndings
Exclude `lineEndings`, in Annotation-data, in MOZCENTRAL builds (PR 14899 follow-up)
This commit is contained in:
commit
598421b11f
@ -848,6 +848,9 @@ class Annotation {
|
||||
* @param {Array} lineEndings - The line endings array.
|
||||
*/
|
||||
setLineEndings(lineEndings) {
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
||||
throw new Error("Not implemented: setLineEndings");
|
||||
}
|
||||
this.lineEndings = ["None", "None"]; // The default values.
|
||||
|
||||
if (Array.isArray(lineEndings) && lineEndings.length === 2) {
|
||||
@ -3932,8 +3935,10 @@ class LineAnnotation extends MarkupAnnotation {
|
||||
const lineCoordinates = dict.getArray("L");
|
||||
this.data.lineCoordinates = Util.normalizeRect(lineCoordinates);
|
||||
|
||||
this.setLineEndings(dict.getArray("LE"));
|
||||
this.data.lineEndings = this.lineEndings;
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
this.setLineEndings(dict.getArray("LE"));
|
||||
this.data.lineEndings = this.lineEndings;
|
||||
}
|
||||
|
||||
if (!this.appearance) {
|
||||
// The default stroke color is black.
|
||||
@ -4107,7 +4112,10 @@ class PolylineAnnotation extends MarkupAnnotation {
|
||||
this.data.hasOwnCanvas = this.data.noRotate;
|
||||
this.data.vertices = [];
|
||||
|
||||
if (!(this instanceof PolygonAnnotation)) {
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) &&
|
||||
!(this instanceof PolygonAnnotation)
|
||||
) {
|
||||
// Only meaningful for polyline annotations.
|
||||
this.setLineEndings(dict.getArray("LE"));
|
||||
this.data.lineEndings = this.lineEndings;
|
||||
|
Loading…
Reference in New Issue
Block a user