You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the svg.import.js module which now relies on svg.parser.js.
When importing raw SVG with elements that have a rotate transformation without the optionnal cx and cy parameters, svg.import.js will add them based on SVG.defaults.trans().
Example: <rect transform="rotate(-7.5)" y="1326.0929967499997" x="1281.2933475" height="15" width="15" id="B-1-263-6">
will become the following after the parsing: <rect id="B-1-263-6" width="15" height="15" y="1326.0929967499997" x="1281.2933475" transform="rotate(-7.5 1288.79296875 1333.59375)">
In this case, the rotation center is near the element position instead of being based on the origin (0,0).
If optional parameters and are not supplied, the rotate is about the origin of the current user > coordinate system. The operation corresponds to the matrix [cos(a) sin(a) -sin(a) cos(a) 0 0].
I'm using the svg.import.js module which now relies on svg.parser.js.
When importing raw SVG with elements that have a rotate transformation without the optionnal cx and cy parameters, svg.import.js will add them based on
SVG.defaults.trans()
.Example:
<rect transform="rotate(-7.5)" y="1326.0929967499997" x="1281.2933475" height="15" width="15" id="B-1-263-6">
will become the following after the parsing:
<rect id="B-1-263-6" width="15" height="15" y="1326.0929967499997" x="1281.2933475" transform="rotate(-7.5 1288.79296875 1333.59375)">
In this case, the rotation center is near the element position instead of being based on the origin (0,0).
SVG Tranformations
I think it's better if the parser does not try to add anything here, the spec is valid without cx and cy.
The text was updated successfully, but these errors were encountered: