1
0
Fork 0
Commit graph

221 commits

Author SHA1 Message Date
Enoch Riese
10fe19455d don't render empty pdf pages 2022-08-17 00:34:25 -05:00
Enoch Riese
94c324b2e7 most export to pdf functionality re-instated 2022-08-16 00:33:35 -05:00
joostdecock
62fae66d25 wip(core): Added support for (part-level) optionGroups
This needs some work when merging deeply nested options, but it's a
start
2022-08-15 16:01:42 +02:00
joostdecock
681a1fc657 wip: Handle backwards compatibility for passing parts as array
This was broken by some earlier changes, but not it's ok again
2022-08-15 10:48:35 +02:00
Enoch Riese
4a0f3f65a6 documenting code 2022-08-14 16:50:16 -05:00
joostdecock
7f684d8c17 wip: Pass parts to design constructor as array
Since the part name needs to be set in the part, this makes
it more clear as there's no key associated with the part.
2022-08-14 18:16:15 +02:00
joostdecock
2b254c721d wip: Recursive resolving of (non-injected) dependencies
We started out with following dependencies that are injected
(from) and now added dependencies that are merely required to
be drafted first (after).

This also adds further support for part-level configuration.
2022-08-14 16:59:51 +02:00
joostdecock
4cf9c3bd47 wip: Added part-level dependencies
Restructured code a bit to handle all part-level config in one call.

Removed check in shorthand for debug as it's no longer used.
Updated tests to not fall over on different error message format in
newer NodeJS versions
2022-08-13 18:33:06 +02:00
joostdecock
689f908f68 wip: Allow runtime adding of parts
Just call `pattern.addPart()` and pass it either:
 - a part object with all it entails
 - a draft method as first and name as second parameter

This will overwrite any existing parts without any warning
2022-08-13 15:11:33 +02:00
joostdecock
6c3208768e wip: Added support for part-level measurments and optionalMeasurements
This adds support for part-level measurements and optional measurements
2022-08-13 14:27:39 +02:00
Joost De Cock
a1a3e1c194 fix(core): Fixes for backwards compatibility 2022-08-10 16:24:25 +02:00
Enoch Riese
1a65a16e56 separate print layout from draft layout. add better buttons 2022-08-09 16:17:17 -05:00
joostdecock
70bd946bdc wip(core/brian/aaron): Support for 2022 style part inheritance
This is very rough around the edges, but it's kinda working, so
I'm committing this now.

What this enabled is the ability to extend a part by importing
only that part and then just saying you want a part `from` the
imported one.

The imported part comes with all options, it does not currently
come with all measurements.

This also *follows* dependencies. For example in Brian, we never
explicitly add the base and sleevecap parts, they are simply
added automatically because other parts are buily *from* them.

Best to look at the source code of designs/brian and designs/aaron
to understand what's going on and how it is different.
2022-08-09 20:17:35 +02:00
joostdecock
ac9b616b99 wip(core): Support for 2022 style Design constructor
This is the first commit to tackle some exploratory work
in the context of discussion #2538 that deals with a number
of things, such as:

- Making it easier to attach parts to designs
- Making it easier to attach parts at run-time
- Simplify part inheritance into other designs
- Find ways to handle dependenices across designs
- Find ways to keep the part-specific config with the part

In this initial commit, I've update the Design constructor to
handle two different ways of calling it:

- legacy: new Design(config, plugins, conditionalPlugins)
- 2022: new Design(config)

I didn't want to call this the `new` way because that doesn't
age well, so I went with `legacy` and `2022` and this is how I
will refer to them from now on.

This is very much a work in progress and while I will create a PR
to keep on eye on the tests, I don't expect to merge this as-is.
2022-08-07 17:29:33 +02:00
joostdecock
6acb9f976a feat(core): Added pattern.getCutList() method 2022-07-31 14:32:24 +02:00
joostdecock
8d1bc3c516 feat(core): Add ability to remove cutOnFold 2022-07-31 12:17:51 +02:00
joostdecock
4de192835e chore(core): Tweaks to new methods after review 2022-07-31 09:40:40 +02:00
joostdecock
bc567874c1 feat(core): Added new cutting methods. Closes #2470 2022-07-30 20:02:42 +02:00
joostdecock
1c87769e87 chore(core): Syntax change for better test coverage 2022-07-30 15:16:17 +02:00
joostdecock
293c6bec09 chore(core): Adding unit tests 2022-07-24 21:34:22 +02:00
joostdecock
a357c2e642 chore(core): Tests for path 2022-07-23 20:21:16 +02:00
joostdecock
785c03d013 chore(core): Working on test coverage 2022-07-23 17:00:48 +02:00
joostdecock
50b37f4cb5 feat(core): Added new utility methods for attrs 2022-07-23 14:52:56 +02:00
Joost De Cock
7a33cf1783 chore(core): Make generatePartTransform a named export 2022-07-02 20:05:31 +02:00
Enoch Riese
404718c776 clean up and document 2022-06-28 16:41:44 -05:00
Enoch Riese
b2fcee3037 consistently set up part transforms 2022-06-28 16:13:21 -05:00
Joost De Cock
e89d3db315 chore(core): Keep exporting pctBasedOn for backwards compatibility 2022-06-22 13:23:31 +02:00
Joost De Cock
ac7b1de00e chore(core): Migrated core from rollup to esbuild 2022-06-12 21:49:34 +02:00
Joost De Cock
cb84abcfbc chore(core): Prettier run 2022-05-31 15:57:53 +02:00
Joost De Cock
c0ae2d5e00 fix(core): Incorrect detection of cached path boundary 2022-05-21 19:10:21 +02:00
Joost De Cock
3af2a13439 fix(core): Incorrect warning message 2022-05-21 18:42:13 +02:00
Joost De Cock
f544050529 fix(core): Handle path split on start/end of path segments 2022-03-29 19:32:07 +02:00
Joost De Cock
0b1137f09b chore: Linter run 2022-03-28 19:38:18 +02:00
Joost De Cock
9b5c8a8751 wip(core): Changes to facilitate manual layouts 2022-03-06 18:55:13 +01:00
Joost De Cock
9541fea78c feat(core): Added autoLayout pattern prop 2022-02-25 08:29:28 +01:00
Joost De Cock
f4ee97a626 feat(core): Added the postLayout lifecycle hook 2022-02-20 18:45:44 +01:00
Joost De Cock
a88a5c453c Merge branch 'develop' of github.com:freesewing/freesewing into develop 2022-02-05 08:43:36 +01:00
Joost De Cock
6efd94af2b fix(core): Properly escape quotes in SVG text 2022-02-05 08:42:20 +01:00
Joost De Cock
0a656ab440 feat(core): Add a default hide() method to options
This adds a default `hide()` method to all pattern options
(that are not a constant) which always returns false.

The idea is that this can/will be used for conditional display
of options based on the user's input.

See Issue #1723 and PR #1798 for background info
2022-02-05 07:11:09 +01:00
Joost De Cock
6dad5ca833 chore(core): Always raise debug
Currently we check in many different places whether debug is enabled
prior to raising a debug event.

This changes that to always raise debug, but let the debug.raise()
method only store it on the pattern object if/when debug is
enabled.
2022-01-28 18:18:37 +01:00
Joost De Cock
d05e7f2196 chore(core): Don't raise debug info for path.render 2022-01-28 16:57:30 +01:00
Joost De Cock
c13b063bb5 fix(core): Use default import for JSON 2022-01-25 09:29:09 +01:00
Joost De Cock
2234155052 chore: Fixed linter warnings 2022-01-20 09:07:38 +01:00
Joost De Cock
8192cf068e chore(core): Make it prettier 2022-01-19 16:26:00 +01:00
Joost De Cock
bb8a3a960e wip(core): Changes to support settings.scale. See #1638 2022-01-15 21:28:48 +01:00
Joost De Cock
6eae537d42 fix(core): Keep SVG vars out of style tag. Closes #1606 2022-01-08 14:14:09 +01:00
Joost De Cock
db5d4a2475 fix(core): Remove console.log statement 2021-12-29 09:05:43 +01:00
Joost De Cock
e4a87f3324 feat(core): Added scale setting 2021-12-24 14:47:42 +01:00
Joost De Cock
2eb7a23750 feat(core): Added the Attributes.setIfUnset() method 2021-11-21 17:18:10 +01:00
Joost De Cock
5343427e0d chore: linter warnings 2021-11-13 14:55:04 +01:00