From 7bc8e0c76af9c113cd314083f83276d4ca80cca2 Mon Sep 17 00:00:00 2001 From: Benjamin Fan Date: Thu, 8 Feb 2024 06:56:54 -0800 Subject: [PATCH 1/4] fix(markdown): Add closed parameter to Path.join() doc --- markdown/dev/reference/api/path/join/en.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/markdown/dev/reference/api/path/join/en.md b/markdown/dev/reference/api/path/join/en.md index 68dbebfb235..7c4a7d7db9d 100644 --- a/markdown/dev/reference/api/path/join/en.md +++ b/markdown/dev/reference/api/path/join/en.md @@ -12,9 +12,12 @@ If that's not what you want, you should use ## Signature ```js -Path path.join(path other) +Path path.join(path other[, bool closed=false]) ``` +The second argument will optionally be used to close the joined path. +By default the joined path is left unclosed. + ## Examples From bf4b4c8755a9a4897454bcacd3a6ff907346c697 Mon Sep 17 00:00:00 2001 From: Benjamin Fan Date: Thu, 8 Feb 2024 06:58:39 -0800 Subject: [PATCH 2/4] fix(markdown): Clarify optional parameters for Path methods docs --- markdown/dev/reference/api/path/addtext/en.md | 2 +- markdown/dev/reference/api/path/attr/en.md | 6 +++--- markdown/dev/reference/api/path/settext/en.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/markdown/dev/reference/api/path/addtext/en.md b/markdown/dev/reference/api/path/addtext/en.md index 516712eba82..28884ea8b2d 100644 --- a/markdown/dev/reference/api/path/addtext/en.md +++ b/markdown/dev/reference/api/path/addtext/en.md @@ -7,7 +7,7 @@ The `Path.addText()` method adds text to the path. ## Signature ```js -Path path.addText(string text, string className) +Path path.addText(string text[, string className]) ``` The second argument will optionally be used to set the CSS class for the text. diff --git a/markdown/dev/reference/api/path/attr/en.md b/markdown/dev/reference/api/path/attr/en.md index 75d27b52763..5e83640fb66 100644 --- a/markdown/dev/reference/api/path/attr/en.md +++ b/markdown/dev/reference/api/path/attr/en.md @@ -5,7 +5,7 @@ title: Path.attr() This `Path.attr()` method can be used to add attributes to the Path object. It calls `this.attributes.add()` under the hood, and returns the Path object. -If the third parameter is set to `true` it will call `this.attributes.set()` +If the optional third parameter is set to `true` it will call `this.attributes.set()` instead, thereby overwriting the value of the attribute. ## Signature @@ -13,8 +13,8 @@ instead, thereby overwriting the value of the attribute. ```js Path path.attr( string name, - mixed value, - bool overwrite = false + mixed value[, + bool overwrite = false] ) ``` diff --git a/markdown/dev/reference/api/path/settext/en.md b/markdown/dev/reference/api/path/settext/en.md index fa9397d3eb7..1ff8a5d6b83 100644 --- a/markdown/dev/reference/api/path/settext/en.md +++ b/markdown/dev/reference/api/path/settext/en.md @@ -7,7 +7,7 @@ The `Path.setText()` method sets text on the path. ## Signature ```js -Path path.setText(string text, string className) +Path path.setText(string text[, string className]) ``` The second argument will optionally be used to set the CSS class for the text. From c2d5b943b6a3dce1657adac8bbebd38ec7c43b4d Mon Sep 17 00:00:00 2001 From: Benjamin Fan Date: Sun, 11 Feb 2024 06:39:10 -0800 Subject: [PATCH 3/4] fix(markdown): Change optional parameter doc format from man page to JavaScript --- markdown/dev/reference/api/path/addtext/en.md | 2 +- markdown/dev/reference/api/path/attr/en.md | 4 ++-- markdown/dev/reference/api/path/join/en.md | 2 +- markdown/dev/reference/api/path/settext/en.md | 2 +- markdown/dev/reference/api/path/shiftalong/en.md | 2 +- markdown/dev/reference/api/path/shiftfractionalong/en.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/markdown/dev/reference/api/path/addtext/en.md b/markdown/dev/reference/api/path/addtext/en.md index 28884ea8b2d..8ce9c0b7021 100644 --- a/markdown/dev/reference/api/path/addtext/en.md +++ b/markdown/dev/reference/api/path/addtext/en.md @@ -7,7 +7,7 @@ The `Path.addText()` method adds text to the path. ## Signature ```js -Path path.addText(string text[, string className]) +Path path.addText(string text, string className = '') ``` The second argument will optionally be used to set the CSS class for the text. diff --git a/markdown/dev/reference/api/path/attr/en.md b/markdown/dev/reference/api/path/attr/en.md index 5e83640fb66..81bf3182525 100644 --- a/markdown/dev/reference/api/path/attr/en.md +++ b/markdown/dev/reference/api/path/attr/en.md @@ -13,8 +13,8 @@ instead, thereby overwriting the value of the attribute. ```js Path path.attr( string name, - mixed value[, - bool overwrite = false] + mixed value, + bool overwrite = false ) ``` diff --git a/markdown/dev/reference/api/path/join/en.md b/markdown/dev/reference/api/path/join/en.md index 7c4a7d7db9d..4f5cb0fc5f5 100644 --- a/markdown/dev/reference/api/path/join/en.md +++ b/markdown/dev/reference/api/path/join/en.md @@ -12,7 +12,7 @@ If that's not what you want, you should use ## Signature ```js -Path path.join(path other[, bool closed=false]) +Path path.join(path other, bool closed = false) ``` The second argument will optionally be used to close the joined path. diff --git a/markdown/dev/reference/api/path/settext/en.md b/markdown/dev/reference/api/path/settext/en.md index 1ff8a5d6b83..9c68ebafe11 100644 --- a/markdown/dev/reference/api/path/settext/en.md +++ b/markdown/dev/reference/api/path/settext/en.md @@ -7,7 +7,7 @@ The `Path.setText()` method sets text on the path. ## Signature ```js -Path path.setText(string text[, string className]) +Path path.setText(string text, string className = '') ``` The second argument will optionally be used to set the CSS class for the text. diff --git a/markdown/dev/reference/api/path/shiftalong/en.md b/markdown/dev/reference/api/path/shiftalong/en.md index 89f0ed21d64..7d6ce5b41c8 100644 --- a/markdown/dev/reference/api/path/shiftalong/en.md +++ b/markdown/dev/reference/api/path/shiftalong/en.md @@ -8,7 +8,7 @@ along the path. ## Signature ```js -Point path.shiftAlong(float distance[, int stepsPerMm=10]) +Point path.shiftAlong(float distance, int stepsPerMm = 10) ``` The second parameter controls the precision by which the path will be _walked_. diff --git a/markdown/dev/reference/api/path/shiftfractionalong/en.md b/markdown/dev/reference/api/path/shiftfractionalong/en.md index 6bceb4f1576..98e76342981 100644 --- a/markdown/dev/reference/api/path/shiftfractionalong/en.md +++ b/markdown/dev/reference/api/path/shiftfractionalong/en.md @@ -8,7 +8,7 @@ length of the path travelled along the path. ## Signature ```js -Point path.shiftFractionAlong(float fraction[, int stepsPerMm=25]) +Point path.shiftFractionAlong(float fraction, int stepsPerMm = 25) ``` The second parameter controls the precision by which the path will be _walked_. From ab83799c2cd35e5b5bf82367afca302f179a0e56 Mon Sep 17 00:00:00 2001 From: Benjamin Fan Date: Sun, 11 Feb 2024 06:52:59 -0800 Subject: [PATCH 4/4] chore(markdown): Revert Join doc to develop version --- markdown/dev/reference/api/path/join/en.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/markdown/dev/reference/api/path/join/en.md b/markdown/dev/reference/api/path/join/en.md index 4f5cb0fc5f5..68dbebfb235 100644 --- a/markdown/dev/reference/api/path/join/en.md +++ b/markdown/dev/reference/api/path/join/en.md @@ -12,12 +12,9 @@ If that's not what you want, you should use ## Signature ```js -Path path.join(path other, bool closed = false) +Path path.join(path other) ``` -The second argument will optionally be used to close the joined path. -By default the joined path is left unclosed. - ## Examples