mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Fix inconsistent spacing and trailing commas in objects in remaining src/
files, so we can enable the comma-dangle
and object-curly-spacing
ESLint rules later on
http://eslint.org/docs/rules/comma-dangle http://eslint.org/docs/rules/object-curly-spacing Given that we currently have quite inconsistent object formatting, fixing this in *one* big patch probably wouldn't be feasible (since I cannot imagine anyone wanting to review that); hence I've opted to try and do this piecewise instead. Please note: This patch was created automatically, using the ESLint `--fix` command line option. In a couple of places this caused lines to become too long, and I've fixed those manually; please refer to the interdiff below for the only hand-edits in this patch. ```diff diff --git a/src/display/canvas.js b/src/display/canvas.js index 5739f6f2..4216b2d2 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -2071,7 +2071,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { var map = []; for (var i = 0, ii = positions.length; i < ii; i += 2) { map.push({ transform: [scaleX, 0, 0, scaleY, positions[i], - positions[i + 1]], x: 0, y: 0, w: width, h: height, }); + positions[i + 1]], x: 0, y: 0, w: width, h: height, }); } this.paintInlineImageXObjectGroup(imgData, map); }, diff --git a/src/display/svg.js b/src/display/svg.js index 9eb05dfa..2aa21482 100644 --- a/src/display/svg.js +++ b/src/display/svg.js @@ -458,7 +458,11 @@ SVGGraphics = (function SVGGraphicsClosure() { for (var x = 0; x < fnArrayLen; x++) { var fnId = fnArray[x]; - opList.push({ 'fnId': fnId, 'fn': REVOPS[fnId], 'args': argsArray[x], }); + opList.push({ + 'fnId': fnId, + 'fn': REVOPS[fnId], + 'args': argsArray[x], + }); } return opListToTree(opList); }, ```
This commit is contained in:
parent
593dec1bb7
commit
f20d2cd2ae
12 changed files with 144 additions and 140 deletions
|
@ -73,7 +73,7 @@ var WebGLUtils = (function WebGLUtilsClosure() {
|
|||
// The temporary canvas is used in the WebGL context.
|
||||
currentCanvas = document.createElement('canvas');
|
||||
currentGL = currentCanvas.getContext('webgl',
|
||||
{ premultipliedalpha: false });
|
||||
{ premultipliedalpha: false, });
|
||||
}
|
||||
|
||||
var smaskVertexShaderCode = '\
|
||||
|
@ -432,7 +432,7 @@ var WebGLUtils = (function WebGLUtilsClosure() {
|
|||
},
|
||||
composeSMask,
|
||||
drawFigures,
|
||||
clear: cleanup
|
||||
clear: cleanup,
|
||||
};
|
||||
})();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue