Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
KTibow authored Nov 12, 2023
1 parent 0234ccc commit c6c98cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/03-plugins/convert-path-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ svgo:
description: If to convert regular lines to an explicit horizontal or vertical line where possible.
default: true
convertToZ:
description: If to convert lines that go to the start to a `z` command.
description: If to convert lines that go to the start to a <code>z</code> command.
default: true
curveSmoothShorthands:
description: If to convert curves to smooth curves where possible.
Expand Down Expand Up @@ -58,7 +58,7 @@ This plugin uses multiple techniques to either reduce the number of instructions

* Convert between relative or absolute coordinates, whichever is shortest.
* Convert between commands. For example, a bézier curve that behaves like a straight line might as well use a line instruction.
* Remove commands (when applicable). For example, a command that moves to the current position can be removed.
* Remove redundant commands. For example, a command that moves to the current position can be removed.
* Trim redundant delimiters and leading zeros.
* Round numeric values using conventional rounding rules.

Expand Down
2 changes: 0 additions & 2 deletions plugins/convertPathData.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ exports.fn = (root, params) => {
(computedStyle['stroke-linecap'].type === 'dynamic' ||
computedStyle['stroke-linecap'].value !== 'butt');
const maybeHasStrokeAndLinecap = maybeHasStroke && maybeHasLinecap;
// TODO: when stroke is used, prefer z more
// Z is the same as going home at 90 and 0 degrees, but not at other degrees
const isSafeToUseZ = maybeHasStroke
? computedStyle['stroke-linecap']?.type === 'static' &&
computedStyle['stroke-linecap'].value === 'round' &&
Expand Down

0 comments on commit c6c98cd

Please sign in to comment.