fix(hugo): Do not render pocket outline when complete is falsy
This commit is contained in:
parent
3565035ff4
commit
4f81e3dc8d
1 changed files with 6 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
||||||
export default function(part) {
|
export default function (part) {
|
||||||
// Remove clutter
|
// Remove clutter
|
||||||
let seam = part.paths.seam
|
let seam = part.paths.seam
|
||||||
part.paths = {}
|
part.paths = {}
|
||||||
|
@ -64,19 +64,15 @@ export default function(part) {
|
||||||
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
||||||
.line(points.raglanTipFront)
|
.line(points.raglanTipFront)
|
||||||
.join(neckOpeningParts[0].reverse())
|
.join(neckOpeningParts[0].reverse())
|
||||||
paths.seam = paths.saBase
|
paths.seam = paths.saBase.clone().close().attr('class', 'fabric')
|
||||||
.clone()
|
|
||||||
.close()
|
|
||||||
.attr('class', 'fabric')
|
|
||||||
paths.saBase.render = false
|
|
||||||
|
|
||||||
paths.pocket = new Path()
|
paths.pocket = new Path()
|
||||||
.move(points.pocketHem)
|
.move(points.pocketHem)
|
||||||
.line(points.pocketTip)
|
.line(points.pocketTip)
|
||||||
.curve(points.pocketTip, points.pocketTopCp, points.pocketTop)
|
.curve(points.pocketTip, points.pocketTopCp, points.pocketTop)
|
||||||
.line(points.pocketCf)
|
.line(points.pocketCf)
|
||||||
.attr('class', 'fabric help')
|
.attr('class', 'fabric help')
|
||||||
|
paths.saBase.render = false
|
||||||
|
paths.pocket.render = false
|
||||||
// Store shoulder seam length, neck opening path, shoulder slope and raglan length
|
// Store shoulder seam length, neck opening path, shoulder slope and raglan length
|
||||||
store.set('shoulderLength', points.neck.dist(points.shoulder))
|
store.set('shoulderLength', points.neck.dist(points.shoulder))
|
||||||
store.set('neckOpeningPartFront', neckOpeningParts[1])
|
store.set('neckOpeningPartFront', neckOpeningParts[1])
|
||||||
|
@ -95,6 +91,7 @@ export default function(part) {
|
||||||
|
|
||||||
// Complete pattern?
|
// Complete pattern?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
|
paths.pocket.render = true
|
||||||
macro('cutonfold', {
|
macro('cutonfold', {
|
||||||
from: points.cfNeck,
|
from: points.cfNeck,
|
||||||
to: points.cfRibbing,
|
to: points.cfRibbing,
|
||||||
|
@ -112,10 +109,7 @@ export default function(part) {
|
||||||
points.logo = points.title.shift(-90, 70)
|
points.logo = points.title.shift(-90, 70)
|
||||||
snippets.logo = new Snippet('logo', points.logo)
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
if (sa) {
|
if (sa) {
|
||||||
paths.sa = paths.saBase
|
paths.sa = paths.saBase.offset(sa).line(points.cfNeck).attr('class', 'fabric sa')
|
||||||
.offset(sa)
|
|
||||||
.line(points.cfNeck)
|
|
||||||
.attr('class', 'fabric sa')
|
|
||||||
paths.sa.move(points.cfRibbing).line(paths.sa.start())
|
paths.sa.move(points.cfRibbing).line(paths.sa.start())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue