1
0
Fork 0
Commit graph

35 commits

Author SHA1 Message Date
Compilin
0ea7f192c4 fix(core): Fixed bug in matrixTransform disregarding the rotation center if centerX is falsy 2023-08-29 09:43:44 +02:00
joostdecock
8fde32950c fix(core): Make mergeI18n methos more robust 2023-07-02 13:50:46 +02:00
joostdecock
73dc20e1d2 fix(core): Make mergeI18n options optional 2023-06-17 20:15:33 +02:00
Joost De Cock
1264a07afe
Merge branch 'develop' into i18n3 2023-06-17 20:11:44 +02:00
joostdecock
631ea8a50d feat(core): New mergeOptions method and passing mergedOtions to toAbs
When using toAbs for all but the most trivial cases, one needs access to
the options. Unlike measurements which are always there, options aren't
always set since they are only set when they differ from the default.

This would shift a lot of responsibility on the pattern designer who
would have to check whether an option is set, and if it's not use the
default which in turn depends on what type of an option it is (and it's
pct for example you have to remember to divide it by 100 and so on).

This feels footgun-y so instead I've added a `mergeOptions` method that
merges the options passed by the user with the defaults from the pattern
config so that you have a simple object with all option values.

This should get passed to `toAbs()` as the 3rd parameter.
2023-06-11 14:16:07 +02:00
joostdecock
66841b6a7f feat(core): Added new translation proposal for designs 2023-06-09 20:44:19 +02:00
Joost De Cock
7aed296564
Merge pull request #3931 from freesewing/beamIntersectsCurve
utils.beamIntersectsCurve()
2023-04-29 20:10:14 +02:00
Enoch Riese
c65c08432a don't rely on browsers to compute transforms in layouting 2023-04-28 15:46:33 -04:00
Wouter van Wageningen
a5f141a586 Docs and code cleanup 2023-04-28 18:26:55 +00:00
Wouter van Wageningen
68c0fca124 Code and tests 2023-04-28 16:42:35 +00:00
Enoch Riese
8ccab0df21 chore (core) cleanup 2023-04-18 18:47:49 -04:00
Enoch Riese
62c747daea lint fixes 2023-04-14 15:48:16 -04:00
Enoch Riese
5311a9ed28 join matrix with commas, computed transformed point coords before mutating 2023-04-14 15:43:26 -04:00
joostdecock
a7276ce95d wip(core): Work on supported part-level transforms in layouting
This is some initial work to support part-level (SVG) transforms when
layouting the pattern.

It updates the method that calculates the bounding box to calculate a
bounding box with transforms applied.
It also adds two new methods to utils to help with that, methods that
could be useful for other people trying to do fancy transform stuff.
2023-04-06 09:55:40 +02:00
Benjamin F
0251b30372 fix(core): Use shift instead of array index 2023-01-06 11:14:45 -08:00
Benjamin F
66c0e9a4e8 fix(core): utils.curvesIntersect() should return a single Point instead of an Array with one Point 2023-01-04 16:32:49 -08:00
Benjamin F
b000039033 fix(core) Small corrections to utils.mjs comments 2022-12-07 18:23:02 -08:00
Enoch Riese
d921cc700d start refactoring tests for speed 2022-11-15 14:50:14 -06:00
Joost De Cock
f759f3986a feat(core): Cast distance to number. See #2897 2022-10-07 21:41:45 +02:00
Joost De Cock
485492e452 wip: Work on design init 2022-09-25 10:55:37 +02:00
Joost De Cock
bb89b6ca65 chore(core): Unit tests for v3 code 2022-09-19 23:35:52 +02:00
Joost De Cock
d5eb2946d3 chore(core): More unit tests 2022-09-19 18:04:47 +02:00
Joost De Cock
200cebf582 chore(core): Refactor v3 code 2022-09-18 15:11:10 +02:00
Joost De Cock
0b18d81e14 feat(core): Added support for multiple sets of settings
This changes they was settings (what the user provides) are handled.
Before this, settings were passed as an object and that was it.
Now, settings are treated as an array of settings objects and this adds
full support for managing multiple sets of settings in a single pattern
instance.

This is the mechanism that's used for FreeSewing's sampling which used
to be a rather hackish implementation, but now merely sets up the
relevant list of settings, and then calls `pattern.draft()` as usual.

Things to be mindful of is that parts, the store and settings themselves
are tied to each set of settings. So where they used to be an object,
they are now an array of object.
2022-09-17 10:24:13 +02:00
Joost De Cock
8cc4c588ff Merge branch 'v3-stacks' into develop 2022-09-14 13:24:38 +02:00
Joost De Cock
1c442ad580 wip(core): Work on stack-based layouts 2022-09-14 12:24:09 +02:00
Joost De Cock
aa1d76ee80 feat(core): Allow loading of plugin data 2022-09-12 18:01:37 +02:00
joostdecock
48b366c57e fix(core): Issue with hiding dependencies 2022-09-11 18:00:41 +02:00
joostdecock
904e0044c5 wip(core): Work on pattern/design unit tests 2022-09-10 15:04:57 +02:00
Joost De Cock
0cbffd6dc6 wip(core): Work on late-stage config resolver
This moves resolving of the config from the pattern constructor to the
init() method. The idea is that adding a part to a pattern is exactly
the same as adding a part to a design. In other words, late-stage adding
of parts would be no different as the config gets resolved after that.

This is currently broken in many different ways, but the unit tests
particular to this new way of resolving the config do pass.
2022-09-09 20:20:38 +02:00
Joost De Cock
7abb11e0af chore(core): Remove debug statement 2022-09-05 08:54:13 +02:00
joostdecock
7133f33eaf wip(core): Work on plugin loading 2022-09-04 18:22:02 +02:00
Joost De Cock
8a74a36697 feat(core): Move plugins to part-level config 2022-08-31 17:52:39 +02:00
Joost De Cock
c09ae4aa69 wip(core): Migrated to named exports only 2022-08-28 02:14:39 +02:00
Joost De Cock
3671f44e90 chore: Move core files to .mjs 2022-08-26 18:51:02 +02:00
Renamed from packages/core/src/utils.js (Browse further)