1
0
Fork 0
Commit graph

50 commits

Author SHA1 Message Date
joostdecock
eded9e9d3a fix(core): Handle path splits on start or end points
In some edge cases, like when splitting a path on or very close to its
start or end point, `Path.split()` will return an array in which one of
the elements is not a Path object, but rather an empty array.

That is rather combersome to check for, so this changes that behaviour
and will return null for such cases.

I've also updated the documentation to clarify this behaviour.

Fixes #6816

This also fixes a bug when a path was being split on its end point.
2024-06-12 13:24:42 +02:00
Jonathan Haas
ed608b52a0
Add documentation and rename method 2024-04-18 10:53:30 +02:00
Jonathan Haas
849563d1ec
add(core): Add Path.rotate(...) function analogue to Point.rotate(...) 2024-04-05 14:45:20 +02:00
Joost De Cock
8f7fffb81e
Merge pull request #6019 from BenJamesBen/path-combine-typo
fix(markdown): Typo in Path.combine() doc
2024-02-12 17:44:02 +01:00
Benjamin Fan
85c858d824 fix(markdown): Typo in Path.combine() doc 2024-02-11 09:39:48 -08:00
Joost De Cock
2d43e0408e
Merge pull request #5990 from BenJamesBen/path-doc-update
fix(markdown): Path doc updates for optional parameters
2024-02-11 17:37:39 +01:00
Benjamin Fan
ab83799c2c chore(markdown): Revert Join doc to develop version 2024-02-11 06:52:59 -08:00
Benjamin Fan
c2d5b943b6 fix(markdown): Change optional parameter doc format from man page to JavaScript 2024-02-11 06:48:51 -08:00
Benjamin Fan
bf4b4c8755 fix(markdown): Clarify optional parameters for Path methods docs 2024-02-11 06:48:50 -08:00
Benjamin Fan
7bc8e0c76a fix(markdown): Add closed parameter to Path.join() doc 2024-02-11 06:48:50 -08:00
Benjamin Fan
fb03e18ed9 fix(markdown): Typo in Part and Path docs 2024-02-11 06:07:51 -08:00
Joost De Cock
4d94b8d8ca
Merge pull request #6001 from freesewing/joost
feat(core): Added Path.combine and related changes, closes #5976
2024-02-10 16:00:27 +01:00
joostdecock
a30b08371c feat(core): Added Path.combine and related changes, closes #5976
The discussion in #5976 is whether `Path.join()` should use a line
segment to close any gaps in the path caused by move operations, or by
differences in the end and start points of paths being joined.

The answer is yes, that is the intended behaviour, but people who read
_join_ might expect differently.

So I have made a few changes to clarify this:

- The new `Path.combine()` method combines multiple path instances into
  a single instance without making any changes to the drawing operations
- Since `Path.combine()` is variadic, I have also updated `Path.join()`
  to be variadic too, since that is more consistent.
- The old way of calling `Path.join(path, bool)` is deprecated and will
  log a warning. Calling `Path.join()` this way will be removed in v4.
- Related to this change is how `Path.length()` should behave when there
  are gaps in the path. Currently, it skips those. So I've added a
  parameter that when set to `true` will include them.
- Added documentation for `Path.combine()`
- Updated documentation for `Path.join()`
- Updated documentation for `Path.length()`
2024-02-10 15:40:41 +01:00
Benjamin Fan
07e0f21f30 fix(markdown): Typo in Path doc 2024-02-09 07:18:26 -08:00
Benjamin Fan
83ae88c5d5 fix(markdown): Remove unused list attribute from ReadMore tags 2024-01-29 08:43:38 -08:00
Benjamin Fan
4d404dd3cc fix(markdown) Fix typos 2024-01-21 11:16:40 -08:00
Thrunic
4ecbbbddb0 Replaced path.addClass(...) with path.setClass(...) in the example. 2023-12-08 13:28:42 -05:00
joostdecock
dae323b697 fix(markdown): Broken links. Closes #5463 2023-11-12 11:13:38 +01:00
joostdecock
57d50c42da feat(markdown): Docs for new/updated core methods 2023-06-01 16:48:11 +02:00
Benjamin F
a111477bbf fix(docs): Add blank lines at start and end of Warning component 2023-04-05 15:02:57 -07:00
Benjamin F
080c75e733 fix(docs): Add warning to curve intersection methods and functions 2023-04-04 22:04:53 -07:00
Joost De Cock
7e8eb9d71e
Merge pull request #3351 from BenJamesBen/path-attr-length-examples
fix(docs): Change examples to actually use the documented method
2022-12-31 17:10:24 +01:00
Benjamin F
5a7ae2ac45 fix(docs): Change example to restore macros 2022-12-30 08:22:32 -08:00
Benjamin F
d1dc9feb66 fix(docs): Trim trailing whitespace and blank lines 2022-12-30 07:47:29 -08:00
Benjamin F
2225d1ea83 fix(docs): Change examples to actually use the documented method 2022-12-30 07:38:49 -08:00
Benjamin F
7b8b6997d0 fix(docs): Insert space between numbers and SI units 2022-12-26 07:00:16 -08:00
Benjamin F
965585f368 fix(docs): Correct spelling of Bezier to Bézier with accented "e" 2022-12-23 21:56:40 -08:00
Joost De Cock
f51e69d6af
Merge branch 'develop' into spellcheck-typos-fix 2022-12-15 17:55:47 +01:00
Benjamin F
b53f62c4d1 fix(docs) Add custom attributes and Snippets documentation 2022-12-14 21:24:28 -08:00
Benjamin F
fea16617d4 fix(docs): Correct small typos 2022-12-14 12:52:37 -08:00
Benjamin F
1ba6fc4e7f fix(docs): Add paths to prevent Example clipping 2022-12-09 21:23:35 -08:00
Benjamin F
2bddb66d87 fix(docs): Change Path.SetText() docs to use correct name 2022-12-07 21:03:29 -08:00
joostdecock
fab1e2f877 feat(core): Added Path.clean() method. Closes #3038 and #3056
This is a fix for bug #3038 which was investigated by @BenJamesBen
who also proposed a fix in PR #3056

However, after discussing the matter, we agreed it would be better
to have a generic method in core to guard against the issue of
spurious drawing operations.

This commit adds the `Path.clean()` method that does exactly that,
as well as its documentation.
2022-12-03 17:28:05 +01:00
Joost De Cock
3391859fb7 chore(markdown): Keep reference docs alphabetic 2022-09-29 19:03:02 +02:00
Joost De Cock
9ddad408b0 chore: Updating final Path docs for v3 2022-09-29 17:50:53 +02:00
Joost De Cock
ede3c137bc chore(docs): Updated Path api docs for v3 2022-09-27 18:24:35 +02:00
Joost De Cock
f0e233513b wip(dev): More changes for v3 docs 2022-09-25 10:55:37 +02:00
joostdecock
75de42a03d wip(dev): Working on site changes 2022-09-25 10:55:37 +02:00
nikhil
0becd057b2 fix: Broken/misleading links to designs' source code
Some of these links were actually broken, since they expect to find designs under the `packages/` directory in the current `develop` branch. Other links were technically okay, since they link to old commits, but updating those links may still help to reduce confusion.

Also fix a reference to `packages/unice` in a `netlify.toml` file. (Untested, but I don't think this is an actual Netlify configuration.)
2022-08-21 12:31:23 -04:00
nikhil
c83d618ad3 fix: Broken links to the API reference 2022-08-20 18:07:26 -04:00
joostdecock
9f958656d9 chore(markdown): Docs linter run 2022-07-31 16:11:50 +02:00
Joost De Cock
e7250f0bc0 feat(dev): Added path.noop/path.insop example 2022-06-09 17:36:55 +02:00
Joost De Cock
249f2600e5 chore: More linting
@nicholasdower is smarter than me. What's missing was the
`listItemIndent` setting
2022-02-20 14:44:38 +01:00
Joost De Cock
e6f1189017 chore: Remark linter run 2022-02-20 14:35:50 +01:00
Nick Dower
e9dbdc46fc Add checkdocs workflow. 2022-02-19 13:51:09 +01:00
Joost De Cock
265ad404da chore(markdown): Linting of dev docs 2022-02-19 08:04:25 +01:00
Joost De Cock
7bebd8cf07 fix(markdown): Move caption to children 2022-01-19 11:31:39 +01:00
joostdecock
cba1ab19c8 Revert "chore: Linting for markdown and js"
This reverts commit 1c92e0f655.
2021-10-17 18:26:00 +02:00
joostdecock
1c92e0f655 chore: Linting for markdown and js 2021-10-17 17:34:55 +02:00
Joost De Cock
b34a2ee2ed feat: Flat import of markdown repo
This is a flat (without history) import of (some of) the content
from our markdown module.

We've imported this without history because the repo contains our
blog posts and showcases posts content prior to porting them to strapi.

Since this contains many images, it would balloon the size of this repo
to import the full history.

Instead, please refer to the history of the (archived) markdown repo
at: https://github.com/freesewing/markdown
2021-08-25 16:09:31 +02:00