Skip to content

Commit

Permalink
fix vector constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
Cenadros committed Jun 6, 2024
1 parent 86dc47f commit a9d6fef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions plugin-src/transformers/partials/transformVectorPaths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ const transformVectorPath = (
svgAttrs: {
fillRule: translateWindingRule(vectorPath.windingRule)
},
constraintsH: 'scale',
constraintsV: 'scale',
...transformStrokesFromVector(node, normalizedPaths, vectorRegion),
...transformEffects(node),
...transformDimensionAndPositionFromVectorPath(vectorPath, baseX, baseY),
...transformSceneNode(node),
...transformBlend(node),
...transformProportion(node),
...transformConstraints(node)
...transformProportion(node)
};
};
2 changes: 0 additions & 2 deletions plugin-src/transformers/transformGroupNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ export const transformGroupNodeLike = (
return {
type: 'group',
name: node.name,
constraintsH: 'scale',
constraintsV: 'scale',
...transformDimensionAndPosition(node, baseX, baseY),
...transformSceneNode(node)
};
Expand Down
10 changes: 8 additions & 2 deletions plugin-src/transformers/transformVectorNode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { transformFigmaIds, transformVectorPaths } from '@plugin/transformers/partials';
import {
transformConstraints,
transformFigmaIds,
transformVectorPaths
} from '@plugin/transformers/partials';

import { GroupShape } from '@ui/lib/types/shapes/groupShape';
import { PathShape } from '@ui/lib/types/shapes/pathShape';
Expand All @@ -22,13 +26,15 @@ export const transformVectorNode = (
return {
...children[0],
name: node.name,
...transformFigmaIds(node)
...transformFigmaIds(node),
...transformConstraints(node)
};
}

return {
...transformGroupNodeLike(node, baseX, baseY),
...transformFigmaIds(node),
...transformConstraints(node),
children
};
};

0 comments on commit a9d6fef

Please sign in to comment.