Skip to content

Commit

Permalink
fixed arrows strokecaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Cenadros committed Apr 24, 2024
1 parent 26faf4f commit b202882
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 0 additions & 5 deletions .changeset/chilled-mangos-lie.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/nervous-camels-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"penpot-exporter": patch
---

Fixed strokecaps for arrows that were showing even when not configured in figma
7 changes: 3 additions & 4 deletions plugin-src/translators/translateStrokes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ const translateStrokeAlignment = (
};

const translateStrokeCap = (vertex: VectorVertex): StrokeCaps | undefined => {
if (!vertex.strokeCap) return;
switch (vertex.strokeCap as StrokeCap | ConnectorStrokeCap) {
case 'NONE':
return;
case 'ROUND':
return 'round';
case 'ARROW_EQUILATERAL':
Expand All @@ -79,7 +76,9 @@ const translateStrokeCap = (vertex: VectorVertex): StrokeCaps | undefined => {
case 'DIAMOND_FILLED':
return 'diamond-marker';
case 'ARROW_LINES':
default:
return 'line-arrow';
case 'NONE':
default:
return;
}
};

0 comments on commit b202882

Please sign in to comment.