0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-03 05:10:13 -05:00

fix rotation matrix

This commit is contained in:
Alex Sánchez 2024-04-16 10:17:28 +02:00
parent dbd0d7f5bd
commit 440ce8f4eb
No known key found for this signature in database
GPG key ID: 68A95170EEB87E16

View file

@ -17,12 +17,12 @@ export const transformRectangleNode = (
name: node.name, name: node.name,
fills: translateFills(node.fills, node.width, node.height), fills: translateFills(node.fills, node.width, node.height),
transform: { transform: {
a: node.relativeTransform[0][0], a: node.absoluteTransform[0][0],
b: -node.relativeTransform[0][1], b: node.absoluteTransform[1][0],
c: node.relativeTransform[1][0], c: node.absoluteTransform[0][1],
d: -node.relativeTransform[1][1], d: node.absoluteTransform[1][1],
e: 0, e: 0,
f: -0 f: 0
}, },
rotation: node.rotation < 0 ? node.rotation + 360 : node.rotation, rotation: node.rotation < 0 ? node.rotation + 360 : node.rotation,
...transformDimensionAndPosition(node, baseX, baseY), ...transformDimensionAndPosition(node, baseX, baseY),