mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Remove pointless Math.min
usage in the XFA parsing
When creating the `StyleMapping` for the "xfa-font-horizontal-scale" and "xfa-font-vertical-scale" properties there's currently pointless `Math.min` usage, since we're not actually comparing with anything.
This commit is contained in:
parent
bee0f53c65
commit
1b5151f969
1 changed files with 2 additions and 4 deletions
|
@ -81,13 +81,11 @@ const StyleMapping = new Map([
|
|||
["kerning-mode", value => (value === "none" ? "none" : "normal")],
|
||||
[
|
||||
"xfa-font-horizontal-scale",
|
||||
value =>
|
||||
`scaleX(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`,
|
||||
value => `scaleX(${Math.max(0, parseInt(value) / 100).toFixed(2)})`,
|
||||
],
|
||||
[
|
||||
"xfa-font-vertical-scale",
|
||||
value =>
|
||||
`scaleY(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`,
|
||||
value => `scaleY(${Math.max(0, parseInt(value) / 100).toFixed(2)})`,
|
||||
],
|
||||
["xfa-spacerun", ""],
|
||||
["xfa-tab-stops", ""],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue