0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-21 15:02:27 -05:00
penpot-exporter-figma-plugin/plugin-src/transformers/partials/transformDimensionAndPosition.ts

15 lines
335 B
TypeScript
Raw Normal View History

2024-04-15 11:58:51 +00:00
import { ShapeGeomAttributes } from '@ui/lib/types/shape/shapeGeomAttributes';
export const transformDimensionAndPosition = (
node: DimensionAndPositionMixin,
baseX: number,
baseY: number
): ShapeGeomAttributes => {
return {
x: node.x + baseX,
y: node.y + baseY,
width: node.width,
height: node.height
};
};