From da58f5b881f82577fe3da28a9617012d8a1d8341 Mon Sep 17 00:00:00 2001 From: Wouter van Wageningen Date: Sat, 30 Jul 2022 22:28:48 +0000 Subject: [PATCH] Tests... --- designs/octoplushy/config/index.js | 4 ++-- designs/octoplushy/src/index.js | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/designs/octoplushy/config/index.js b/designs/octoplushy/config/index.js index 6bc1db2dfa7..dfcb336ed3e 100644 --- a/designs/octoplushy/config/index.js +++ b/designs/octoplushy/config/index.js @@ -9,10 +9,10 @@ export default { type: 'pattern', difficulty: 5, optionGroups: { - style: ['size','type','legWidth','legLength','neckWidth','legTaper','bottomTopLegRatio','bottomLegReduction','bottomLegReductionPlushy'], + options: ['size','type','legWidth','legLength','neckWidth','legTaper','bottomTopLegRatio','bottomLegReduction','bottomLegReductionPlushy'], }, - measurements: [], parts: ['headSection0', 'headSection1', 'legSection0', 'legSection1', 'eye0', 'eye1', 'eye2'], + measurements: [], dependencies: { eye0: 'headSection0', eye1: 'headSection0', diff --git a/designs/octoplushy/src/index.js b/designs/octoplushy/src/index.js index 769658f2e06..b44dbf8faa5 100644 --- a/designs/octoplushy/src/index.js +++ b/designs/octoplushy/src/index.js @@ -6,18 +6,22 @@ import draftLegSection from './legSection' import draftEye from './eye' // Create new design -const Pattern = new freesewing.Design(config, plugins) +const Octoplushy = new freesewing.Design(config, plugins) // Attach the draft methods to the prototype -// Pattern.prototype.draftHeadSection = draftHeadSection +// Octoplushy.prototype.draftHeadSection = draftHeadSection for (let i = 0; i < 2; i++) { - Pattern.prototype[`draftHeadSection${i}`] = (part) => draftHeadSection(i, part) + Octoplushy.prototype[`draftHeadSection${i}`] = (part) => draftHeadSection(i, part) } for (let i = 0; i < 2; i++) { - Pattern.prototype[`draftLegSection${i}`] = (part) => draftLegSection(i, part) + Octoplushy.prototype[`draftLegSection${i}`] = (part) => draftLegSection(i, part) } for (let i = 0; i < 3; i++) { - Pattern.prototype[`draftEye${i}`] = (part) => draftEye(i, part) + Octoplushy.prototype[`draftEye${i}`] = (part) => draftEye(i, part) } -export default Pattern +// Named exports +export { config, Octoplushy } + +// Default export +export default Octoplushy