Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: matrixToTransform() #1935

Merged
merged 24 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
553bf3a
Initial version.
johnkenny54 Jan 12, 2024
5eac2ec
Fixed bug with translate(n,n).
johnkenny54 Jan 13, 2024
cbadec3
Fixed formatting in JSDoc.
johnkenny54 Jan 13, 2024
f4b7289
Cleaned up variable names, reduced trig calculations.
johnkenny54 Jan 14, 2024
40b5e6d
Initial version.
johnkenny54 Jan 17, 2024
2396e7b
Test case 1 - partial.
johnkenny54 Jan 18, 2024
f0e8309
Finished changes for test 1.
johnkenny54 Jan 18, 2024
9387dcc
All plugin tests pass.
johnkenny54 Jan 18, 2024
81b4347
Passes all tests.
johnkenny54 Jan 18, 2024
8ba11c0
Moved functions to remove circular dependency.
johnkenny54 Jan 19, 2024
978d508
Try both QR decompositions.
johnkenny54 Jan 27, 2024
7d7255d
Changed input back to original version with commas.
johnkenny54 Jan 27, 2024
2cf0dc8
Removed extra paren.
johnkenny54 Jan 27, 2024
4ef8a78
Added new test case, removed common code from convertTransform.js.
johnkenny54 Jan 31, 2024
7d3677a
Added support for rotate(-180), fixed logic for inverting scale().
johnkenny54 Feb 2, 2024
0ec256b
Update test/plugins/convertTransform.06.svg.txt
johnkenny54 Feb 4, 2024
03c106f
Update test/plugins/convertTransform.14.svg.txt
johnkenny54 Feb 4, 2024
9320ec9
Update plugins/_transforms.js
johnkenny54 Feb 4, 2024
0360117
Update plugins/_transforms.js
johnkenny54 Feb 4, 2024
a6a6f22
Update plugins/convertTransform.js
johnkenny54 Feb 4, 2024
f463011
Code cleanup.
johnkenny54 Feb 4, 2024
3dd86ad
Update plugins/_transforms.js
johnkenny54 Feb 4, 2024
5b2d220
Fixed bug copying decomposed matrix.
johnkenny54 Feb 4, 2024
28a61ac
Fixed unit test.
johnkenny54 Feb 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/svgo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,14 @@ test('encode as datauri', () => {
plugins: ['convertTransform'],
});
expect(dataSinglePass).toMatchInlineSnapshot(
`"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20transform%3D%22scale(2)rotate(-45%20130.898%20-126.14)%22%2F%3E%3C%2Fsvg%3E"`,
`"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20transform%3D%22rotate(-45%20261.757%20-252.243)scale(2)%22%2F%3E%3C%2Fsvg%3E"`,
);
const { data: dataMultiPass } = optimize(input, {
multipass: true,
datauri: 'enc',
plugins: ['convertTransform'],
});
expect(dataMultiPass).toMatchInlineSnapshot(
`"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20transform%3D%22rotate(-45%20261.796%20-252.28)scale(2)%22%2F%3E%3C%2Fsvg%3E"`,
`"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20transform%3D%22rotate(-45%20261.757%20-252.243)scale(2)%22%2F%3E%3C%2Fsvg%3E"`,
);
});
Loading