Skip to content

Commit

Permalink
draft
Browse files Browse the repository at this point in the history
  • Loading branch information
Cenadros committed Apr 26, 2024
1 parent 7ed24ea commit 93cda43
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugin-src/transformers/partials/transformVectorPaths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@ import { translateVectorPaths } from '@plugin/translators';

import { PathAttributes } from '@ui/lib/types/path/pathAttributes';

const hasFillGeometry = (node: VectorNode | StarNode | LineNode | PolygonNode): boolean => {
return 'fillGeometry' in node && node.fillGeometry.length > 0;
};

const getVectorPaths = (node: VectorNode | StarNode | LineNode | PolygonNode): VectorPaths => {
switch (node.type) {
case 'STAR':
case 'POLYGON':
return node.fillGeometry;
case 'VECTOR':
return hasFillGeometry(node) ? node.fillGeometry : node.vectorPaths;
return node.vectorPaths;
case 'LINE':
return node.strokeGeometry;
}
Expand Down

0 comments on commit 93cda43

Please sign in to comment.