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
@ -81,13 +81,11 @@ const StyleMapping = new Map([
|
|||||||
["kerning-mode", value => (value === "none" ? "none" : "normal")],
|
["kerning-mode", value => (value === "none" ? "none" : "normal")],
|
||||||
[
|
[
|
||||||
"xfa-font-horizontal-scale",
|
"xfa-font-horizontal-scale",
|
||||||
value =>
|
value => `scaleX(${Math.max(0, parseInt(value) / 100).toFixed(2)})`,
|
||||||
`scaleX(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"xfa-font-vertical-scale",
|
"xfa-font-vertical-scale",
|
||||||
value =>
|
value => `scaleY(${Math.max(0, parseInt(value) / 100).toFixed(2)})`,
|
||||||
`scaleY(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`,
|
|
||||||
],
|
],
|
||||||
["xfa-spacerun", ""],
|
["xfa-spacerun", ""],
|
||||||
["xfa-tab-stops", ""],
|
["xfa-tab-stops", ""],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user