1
0
Fork 0
Commit graph

7 commits

Author SHA1 Message Date
joostdecock
ab6511f4b9 chore(core): Cleaned up renderprops 2023-06-04 16:52:02 +02:00
joostdecock
a2800dddda feat(core): Added Pattern.getLogs() and updated Pattern.getRenderProps()
The data returned by `Pattern.getRenderProps()` was not serializable as
we were returning `this` all over the place, thereby including marcors,
log methods, cyclic object references, and so on.

This commit changes that by implementing a `.asRenderProp()` method on
all of the various objects (stack, part, path, point, snippet,
attributes, svg) and only including data that can be serialized.

In addition, we no longer include the logs in the renderProps because
they are not related to rendering the pattern.
Instead, the new method `Pattern.getLogs()` gives you the logs.
2023-06-01 16:45:13 +02:00
Wouter van Wageningen
895baf48d5 Spelling mistake 2023-04-20 05:43:05 +00:00
Joost De Cock
200cebf582 chore(core): Refactor v3 code 2022-09-18 15:11:10 +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
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/attributes.js (Browse further)