mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
e5f2943532
* Implement rotation for frames and sections * wip * finish implementation * add changelog
21 lines
507 B
TypeScript
21 lines
507 B
TypeScript
import { ShapeGeomAttributes } from '@ui/lib/types/shapes/shape';
|
|
|
|
export const transformDimension = (
|
|
node: DimensionAndPositionMixin
|
|
): Pick<ShapeGeomAttributes, 'width' | 'height'> => {
|
|
return {
|
|
width: node.width,
|
|
height: node.height
|
|
};
|
|
};
|
|
|
|
export const transformDimensionAndPosition = (
|
|
node: DimensionAndPositionMixin
|
|
): ShapeGeomAttributes => {
|
|
return {
|
|
x: node.absoluteTransform[0][2],
|
|
y: node.absoluteTransform[1][2],
|
|
width: node.width,
|
|
height: node.height
|
|
};
|
|
};
|