mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Enable the unicorn/prefer-ternary
ESLint plugin rule
To limit the readability impact of these changes, the `only-single-line` option was used; please find additional details at https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md These changes were done automatically, using the `gulp lint --fix` command.
This commit is contained in:
parent
8f83a1359e
commit
674e7ee381
31 changed files with 123 additions and 265 deletions
|
@ -855,11 +855,8 @@ function genericComposeSMask(
|
|||
const b0 = hasBackdrop ? backdrop[2] : 0;
|
||||
|
||||
let composeFn;
|
||||
if (subtype === "Luminosity") {
|
||||
composeFn = composeSMaskLuminosity;
|
||||
} else {
|
||||
composeFn = composeSMaskAlpha;
|
||||
}
|
||||
composeFn =
|
||||
subtype === "Luminosity" ? composeSMaskLuminosity : composeSMaskAlpha;
|
||||
|
||||
// processing image in chunks to save memory
|
||||
const PIXELS_TO_PROCESS = 1048576;
|
||||
|
@ -2258,11 +2255,9 @@ class CanvasGraphics {
|
|||
}
|
||||
|
||||
let charWidth;
|
||||
if (vertical) {
|
||||
charWidth = width * widthAdvanceScale - spacing * fontDirection;
|
||||
} else {
|
||||
charWidth = width * widthAdvanceScale + spacing * fontDirection;
|
||||
}
|
||||
charWidth = vertical
|
||||
? width * widthAdvanceScale - spacing * fontDirection
|
||||
: width * widthAdvanceScale + spacing * fontDirection;
|
||||
x += charWidth;
|
||||
|
||||
if (restoreNeeded) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue