mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-23 06:04:01 -05:00
15 lines
335 B
TypeScript
15 lines
335 B
TypeScript
|
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
|
||
|
};
|
||
|
};
|