1
0
Fork 0
Commit graph

221 commits

Author SHA1 Message Date
Joost De Cock
5f17e0c163 fix(core): Corrected absoluteOptions proxy object in debug mode 2021-11-13 14:45:13 +01:00
joostdecock
7ec07d9db2 fix(core): Remove unneeded warning 2021-10-16 12:28:45 +02:00
joostdecock
1d3a4acd60 chore: Linter run 2021-10-08 17:32:12 +02:00
joostdecock
9f9f3e7f7a Merge branch 'snap-proposal' into develop 2021-10-06 18:35:41 +02:00
joostdecock
dde9de28dc feat(core): Pattern.on() now returns pattern and is chainable 2021-09-28 19:16:35 +02:00
joostdecock
025cf9b88e feat(core): Snapping of percentage options
This commit implements the snapping of percentage options as
outlined in this proposal:

https://github.com/freesewing/freesewing/discussions/1331

Please refer to the link above for all details
2021-09-15 20:20:59 +02:00
joostdecock
c6ceaf2372 release: v2.18.0
## 2.18.0 (2021-09-09)

 ### core

 #### Fixed

  - Handle path.offset() of very short curves with control points on the start or end point Closes [#1257](https://github.com/freesewing/freesewing/issues/1257)

 ### holmes

 #### Fixed

  - The `brimWidth` option is not a percent option, allowing the pattern to scale properly

 ### huey

 #### Fixed

  - Replace cut-on-fold indicator on pocket with a regular grainline indicator Closes [#1265](https://github.com/freesewing/freesewing/issues/1265)

 ### i18n

 #### Added

  - Added translations for Yuri

 #### Fixed

  - Added optional chaining so missing options always lead to clear error message

 ### simon

 #### Fixed

  - Avoid paperless depending on a complete pattern

 ### theo

 #### Fixed

  - Avoid paperless depending on a complete pattern

 ### wahid

 #### Fixed

  - Close Seam Allowance path of front lining Closes [#1267](https://github.com/freesewing/freesewing/issues/1267)
  - Support a zero value for the `backScyeDart` option

 ### yuri
  - Handle path.offset() of very short curves with control points on the start or end point Closes [#1257](https://github.com/freesewing/freesewing/issues/1257)

  - The `brimWidth` option is not a percent option, allowing the pattern to scale properly

  - Replace cut-on-fold indicator on pocket with a regular grainline indicator Closes [#1265](https://github.com/freesewing/freesewing/issues/1265)

  - Added translations for Yuri

  - Added optional chaining so missing options always lead to clear error message

  - Avoid paperless depending on a complete pattern

  - Avoid paperless depending on a complete pattern

  - Close Seam Allowance path of front lining Closes [#1267](https://github.com/freesewing/freesewing/issues/1267)
  - Support a zero value for the `backScyeDart` option
2021-09-09 20:29:21 +02:00
joostdecock
4efc780fc4 fix(core): Handle path.offset() for very short curves
This path.offset method used to travel 2mm along the path to find
out the direction at the start/end of paths.
That caused errors when the curve being offsetted was less then 2mm.
So now, it checks and if it's shorter will use 10% of the path length instead.

This closes #1257
2021-09-04 14:45:29 +02:00
Joost De Cock
ef3bd03e2c chore: Linter run 2021-08-30 11:40:16 +02:00
joostdecock
36dec88c51 fix(core): Remove lingering debug statement 2021-07-14 18:06:07 +02:00
joostdecock
3b9309d995 fix(core): Edge case in utils.beamsIntersect()
See #1206 for details

Closes #1206
Closes #1211
2021-07-14 18:01:04 +02:00
Joost De Cock
c463b10e43 fix(core): Fix bug in path.shiftAlong
This bug would be triggered by an edge-case where we have a path
that is made up of multiple curves/lines.

If the distance to shift lies just beyond the end of one segment,
yet the remaining distance is smaller than the step (by default
that means smaller than 1/25mm) no point would be returned.

This closes #1140
2021-06-22 18:24:11 +02:00
Joost De Cock
b51add044b fix(core): Make path.shiftAlong more precise. Closes #976 2021-04-28 19:39:17 +02:00
Joost De Cock
f191151ee4 chore: Linter changes 2021-04-24 10:16:31 +02:00
Joost De Cock
5c72645d45 fix(core): Treat dependencies as array
This is for #971
2021-04-23 20:09:16 +02:00
Joost De Cock
c7395cd9d9 Fix(core): Resolve array-based dependencies
Tentative fix for #971
2021-04-23 17:42:03 +02:00
Joost De Cock
c1a8943f23 feat(core): part.getId now takes prefix 2021-04-17 15:39:04 +02:00
Joost De Cock
ac3894eaa9 chore: Round coordinates when outputting SVG 2021-04-11 16:28:38 +02:00
Joost De Cock
8924f2d40b fix(core): Do no round point coordinates 2021-04-11 16:20:39 +02:00
Joost De Cock
1a46c8e724 chore: Linter 2021-01-31 09:22:15 +01:00
Sanne Kalkman
fc4124e62e remove space in translate svg 2020-11-23 16:50:32 +01:00
Joost De Cock
1a5b2769aa feat(components): Better snippet support in Draft component
The Draft react component would load the snippets that are part of our
plugin bundle. However, any additional snippets that are created by
plugins would not not get added to the `defs` section, and thus not
be rendered.

This changes the behavior by doing two things:

 - in `core` it adds an SVG object to the renderProps, and makes
   sure to run the `preRender` hook on this SVG object prior to
   returning the renderProps. This way, svg.defs now holds all
   defs, including any that may have been added by custom plugins
 - in the `Draft` component, we no longer add a list of predefined
   snippets to the defs section, but instead just use the svg.defs
   section verbatim. This removes any discrepancies in how SVG
   rendering and React rendering handles the defs section of the
   SVG document, and thus displays snippets.
2020-11-08 18:19:10 +01:00
Joost De Cock
12692e1a64 chore: Changes required for ES6 version of bezier-js 2020-11-04 20:06:19 +01:00
Joost De Cock
72c2a6c9e7 feat(core): Added support for conditional plugins 2020-09-12 19:01:12 +02:00
Joost De Cock
a76ae76fb0 feat(core): Added info type to raise method 2020-09-12 16:31:55 +02:00
Joost De Cock
39d1cdd0ca feat(core): Added name property to parts to hold the part name 2020-08-30 11:48:09 +02:00
Joost De Cock
d2a7d48465 chore(core): Fixed more linter warnings 2020-08-23 17:46:40 +02:00
Joost De Cock
7420007308 chore(core): Fixed linter warning
This was checked incorrectly a few commits back. This fixes that.
2020-08-23 17:42:40 +02:00
Joost De Cock
9125b49841 chore(core): Fixed linter warnings 2020-08-23 17:09:09 +02:00
Joost De Cock
75afc2d9c3 fix(core): Fixed edge-case in utils.pointOnCurve
If we were trying to find a point that lied on a part of a curve
that was a perfect horizontal line, no intersection would be found.
This fixes that.

 - Fixes https://github.com/freesewing/freesewing.org/issues/898
 - Fixes https://github.com/freesewing/freesewing.org/issues/899
 - Fixes https://github.com/freesewing/freesewing.org/issues/913
2020-08-09 09:50:49 +02:00
Joost De Cock
a57afeaf02 fix(core): Fixed set handler for proxied options/measurements object
- Fixes https://github.com/freesewing/freesewing.org/issues/895
 - Fixes https://github.com/freesewing/freesewing.org/issues/894
 - Fixes https://github.com/freesewing/freesewing.org/issues/892
 - Fixes https://github.com/freesewing/freesewing.org/issues/891
 - Fixes https://github.com/freesewing/freesewing.org/issues/888
 - Fixes https://github.com/freesewing/freesewing.org/issues/887
 - Fixes https://github.com/freesewing/freesewing.org/issues/885
 - Fixes https://github.com/freesewing/freesewing.org/issues/883
 - Fixes https://github.com/freesewing/freesewing.org/issues/875
 - Fixes https://github.com/freesewing/freesewing.org/issues/873
 - Fixes https://github.com/freesewing/freesewing.org/issues/870
 - Fixes https://github.com/freesewing/freesewing.org/issues/869
2020-07-29 17:51:53 +02:00
Joost De Cock
2699bb9496 fix(core): Fixed wrong return message in debug output for Path 2020-07-24 16:27:42 +02:00
Joost De Cock
f6e919e42f chore(core): Fixed a few issues regarding to events 2020-07-23 11:54:55 +02:00
Joost De Cock
01ab30656d chore(core): Removed info event type 2020-07-23 10:27:03 +02:00
Joost De Cock
75f0e97c05 chore(core): Made raise non-iterable 2020-07-23 10:26:04 +02:00
Joost De Cock
ffd7ecda59 chore(core): Added raise to path instances
I am not happy about this, but when a Path object is not created via
the proxied constructor, we don't have the raise method inside of it.
2020-07-21 13:59:13 +02:00
Joost De Cock
9ace3b6255 fix(core): Fixed typo in debug code 2020-07-21 13:07:31 +02:00
Joost De Cock
4ac64e05cb chore: Further tweaks to pattern events 2020-07-19 13:01:01 +02:00
Joost De Cock
03da84b824 feat(core): Added new debug event type and debug system 2020-07-18 16:48:29 +02:00
Joost De Cock
b360359cf6 feat(core): Added debug as event type 2020-07-17 14:44:16 +02:00
Joost De Cock
d2bf45e63c fix(core): Properly escape quotes in units. Fixes #437 2020-07-12 15:10:18 +02:00
Joost De Cock
583abb0236 feat(core): Added support for raising events 2020-07-11 18:04:29 +02:00
Joost De Cock
7d3815939b feat(core): Added support for custom sample styles 2020-07-11 15:15:02 +02:00
Joost De Cock
673743faae feat(core): Add support for injecting sample styles
This allows you to override the (path) styles when we
sample the pattern by setting `settings.sample.styles`.

This closes #380
2020-05-30 14:02:37 +02:00
Joost De Cock
224c9525e1 feat(core): Expose Bezier-js via utils
Since the bezier-js library is bundled with @freesewing/core, we
now expose it via utils. This way, people who want to use this
in their plugins or other code are not forced to import it again.
2020-04-18 11:38:08 +02:00
Joost De Cock
ff82e2568b feat: Do not set plugin configuration object on pattern.use()
Plugins can pass a configuration object (or any
sort of data) when loaded with `pattern.use()`.

We use to set that parameter to `false` when loading, but
now we leave it `undefined`. This makes is easy for plugins
to use a default parameter for the configuration/data passed
to it.
2020-04-18 11:36:02 +02:00
Joost De Cock
926e921582 chore: Added more unittests for patterns 2020-03-15 16:34:56 +01:00
Joost De Cock
e9784509ee Do not escape text in plugin, instead escape at render time 2020-03-15 12:20:48 +01:00
Joost De Cock
d7cd438fb7 feat(breanna): First Breanna release candidate 2020-01-18 15:34:57 +01:00
Joost De Cock
06499b9697 feat(core): Added the path.insop() method 2020-01-12 19:04:29 +01:00