Skip to content

Commit

Permalink
Fixed NaN values in parsed style config. Fixes #75
Browse files Browse the repository at this point in the history
  • Loading branch information
fskpf committed Apr 2, 2022
1 parent 7089cff commit 5c9bd93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svg2roughjs",
"version": "2.3.1",
"version": "2.3.2",
"description": "Leverages Rough.js to convert SVGs to a hand-drawn, sketchy representation",
"author": "Fabian Schwarzkopf",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ export function parseStyleConfig(
if (!isIdentityTransform(svgTransform)) {
const m = svgTransform!.matrix
const det = m.a * m.d - m.c * m.b
scaleFactor = Math.sqrt(det)
scaleFactor = Math.sqrt(Math.abs(det))
}

// incorporate the elements base opacity
Expand Down

0 comments on commit 5c9bd93

Please sign in to comment.