fix(cathrin): Fixed the handling of the panels option
This includes a fix for https://github.com/freesewing/freesewing.org/issues/619 as well as a fix for the panels option being numbers rather than strings which causes issues in the DraftConfigurator component
This commit is contained in:
parent
56ac6954be
commit
ce9b1111aa
4 changed files with 40 additions and 47 deletions
|
@ -1,56 +1,49 @@
|
|||
import { version } from "../package.json";
|
||||
import { version } from '../package.json'
|
||||
|
||||
export default {
|
||||
name: "cathrin",
|
||||
name: 'cathrin',
|
||||
version,
|
||||
design: ["Cathrin Åhlén", "Joost De Cock"],
|
||||
code: "Joost De Cock",
|
||||
department: "womenswear",
|
||||
type: "pattern",
|
||||
design: ['Cathrin Åhlén', 'Joost De Cock'],
|
||||
code: 'Joost De Cock',
|
||||
department: 'womenswear',
|
||||
type: 'pattern',
|
||||
difficulty: 4,
|
||||
tags: ["underwear", "top"],
|
||||
tags: ['underwear', 'top'],
|
||||
optionGroups: {
|
||||
fit: ["waistReduction", "panels"],
|
||||
style: [
|
||||
"backOpening",
|
||||
"backRise",
|
||||
"backDrop",
|
||||
"frontRise",
|
||||
"frontDrop",
|
||||
"hipRise"
|
||||
]
|
||||
fit: ['waistReduction', 'panels'],
|
||||
style: ['backOpening', 'backRise', 'backDrop', 'frontRise', 'frontDrop', 'hipRise']
|
||||
},
|
||||
measurements: [
|
||||
"underbust",
|
||||
"naturalWaist",
|
||||
"hipsCircumference",
|
||||
"naturalWaistToUnderbust",
|
||||
"naturalWaistToHip"
|
||||
'underbust',
|
||||
'naturalWaist',
|
||||
'hipsCircumference',
|
||||
'naturalWaistToUnderbust',
|
||||
'naturalWaistToHip'
|
||||
],
|
||||
dependencies: {
|
||||
panel1: "panels",
|
||||
panel2: "panels",
|
||||
panel3: "panels",
|
||||
panel4: "panels",
|
||||
panel5: "panels",
|
||||
panel6: "panels",
|
||||
panels: "base"
|
||||
panel1: 'panels',
|
||||
panel2: 'panels',
|
||||
panel3: 'panels',
|
||||
panel4: 'panels',
|
||||
panel5: 'panels',
|
||||
panel6: 'panels',
|
||||
panels: 'base'
|
||||
},
|
||||
inject: {
|
||||
panel1: "panels",
|
||||
panel2: "panels",
|
||||
panel3: "panels",
|
||||
panel4: "panels",
|
||||
panel5: "panels",
|
||||
panel6: "panels",
|
||||
panels: "base"
|
||||
panel1: 'panels',
|
||||
panel2: 'panels',
|
||||
panel3: 'panels',
|
||||
panel4: 'panels',
|
||||
panel5: 'panels',
|
||||
panel6: 'panels',
|
||||
panels: 'base'
|
||||
},
|
||||
hide: ["panels", "base"],
|
||||
hide: ['panels', 'base'],
|
||||
options: {
|
||||
// Lists
|
||||
panels: {
|
||||
list: [11, 13],
|
||||
dflt: 13
|
||||
list: ['11', '13'],
|
||||
dflt: '13'
|
||||
},
|
||||
|
||||
// Percentages
|
||||
|
@ -62,4 +55,4 @@ export default {
|
|||
frontDrop: { pct: 5, min: 0, max: 10 },
|
||||
hipRise: { pct: 5, min: 0, max: 15 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
export default function(part) {
|
||||
export default function (part) {
|
||||
let { measurements, options, store, points, paths, Point, Path, utils, debug } = part.shorthand()
|
||||
|
||||
// Where to divide our corset into panels
|
||||
if (options.panels === 11) store.set('gaps', [0.15, 0.275, 0.4, 0.6, 0.75])
|
||||
if (options.panels === '11') store.set('gaps', [0.15, 0.275, 0.4, 0.6, 0.75])
|
||||
else store.set('gaps', [0.2, 0.35, 0.5, 0.65, 0.8])
|
||||
|
||||
// Absolute values for some options
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import draftPanel1ab from './panel1ab'
|
||||
|
||||
export default function(part) {
|
||||
let { macro, sa, paths, options, complete, paperless } = part.shorthand()
|
||||
export default function (part) {
|
||||
let { macro, sa, paths, points, options, complete, paperless } = part.shorthand()
|
||||
|
||||
delete paths.outline
|
||||
delete paths.panel2
|
||||
|
@ -10,7 +10,7 @@ export default function(part) {
|
|||
delete paths.panel5
|
||||
delete paths.panel6
|
||||
|
||||
if (options.panels === 13) return draftPanel1ab(part)
|
||||
if (options.panels === '13') return draftPanel1ab(part)
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default function(part) {
|
||||
export default function (part) {
|
||||
let { measurements, options, store, points, paths, Point, Path, debug } = part.shorthand()
|
||||
let count = 1
|
||||
let bottom = new Path()
|
||||
|
@ -86,7 +86,7 @@ export default function(part) {
|
|||
.move(points.bottomCF)
|
||||
.curve(points.bottomCFCp2, points.hipRiseCp1, points.hipRise)
|
||||
.split(points.hipsGap2)[1]
|
||||
if (options.panels === 11) panel3 = panel3.split(points.hipsGap3)[0]
|
||||
if (options.panels === '11') panel3 = panel3.split(points.hipsGap3)[0]
|
||||
paths.panel3 = panel3
|
||||
.curve(points.hipsGap3Cp, points.waistGap3LeftCp1, points.waistGap3Left)
|
||||
.curve(points.waistGap3LeftCp2, points.underbustGap3LeftCp, points.underbustGap3Left)
|
||||
|
@ -106,7 +106,7 @@ export default function(part) {
|
|||
.curve(points.hipsGap4Cp, points.waistGap4LeftCp1, points.waistGap4Left)
|
||||
.curve(points.waistGap4LeftCp2, points.underbustGap4LeftCp, points.underbustGap4Left)
|
||||
.join(topBack.split(points.underbustGap4Left)[1])
|
||||
if (options.panels === 11) paths.panel4.line(points.underbustGap3Right)
|
||||
if (options.panels === '11') paths.panel4.line(points.underbustGap3Right)
|
||||
paths.panel4
|
||||
.curve(points.underbustGap3RightCp, points.waistGap3RightCp1, points.waistGap3Right)
|
||||
.curve(points.waistGap3RightCp2, points.hipsGap3Cp, points.hipsGap3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue