fix(hugo): Render fully-sized parts when complete is falsy
This commit is contained in:
parent
e4d69a9bf8
commit
eb4764d1d6
2 changed files with 72 additions and 47 deletions
|
@ -13,15 +13,17 @@ export default function(part) {
|
|||
} = part.shorthand()
|
||||
|
||||
let width = store.get('hoodCenterWidth')
|
||||
let length = complete ? width * 2.5 : store.get('hoodCenterLength')
|
||||
points.topLeft = new Point(0, 0)
|
||||
points.bottomLeft = new Point(0, width)
|
||||
points.topMidLeft = new Point(width, 0)
|
||||
points.bottomMidLeft = new Point(width, width)
|
||||
points.topMidRight = new Point(width * 1.5, 0)
|
||||
points.bottomMidRight = new Point(width * 1.5, width)
|
||||
points.topRight = new Point(width * 2.5, 0)
|
||||
points.bottomRight = new Point(width * 2.5, width)
|
||||
points.topRight = new Point(length, 0)
|
||||
points.bottomRight = new Point(length, width)
|
||||
|
||||
if (complete) {
|
||||
paths.seam = new Path()
|
||||
.move(points.topMidLeft)
|
||||
.line(points.topLeft)
|
||||
|
@ -38,6 +40,15 @@ export default function(part) {
|
|||
.move(points.bottomMidLeft)
|
||||
.line(points.bottomMidRight)
|
||||
.attr('class', 'fabric dashed')
|
||||
} else {
|
||||
paths.seam = new Path()
|
||||
.move(points.topLeft)
|
||||
.line(points.bottomLeft)
|
||||
.line(points.bottomRight)
|
||||
.line(points.topRight)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
}
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
|
@ -57,8 +68,6 @@ export default function(part) {
|
|||
y: points.bottomRight.y + sa + 15,
|
||||
text: units(store.get('hoodCenterLength'))
|
||||
})
|
||||
}
|
||||
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
macro('vd', {
|
||||
|
@ -67,6 +76,7 @@ export default function(part) {
|
|||
x: points.topRight.x + sa + 15
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return part
|
||||
}
|
||||
|
|
|
@ -14,16 +14,22 @@ export default function(part) {
|
|||
} = part.shorthand()
|
||||
|
||||
let width = measurements.hpsToHipsBack * options.ribbingHeight * 2
|
||||
let length = complete
|
||||
? width * 2.5
|
||||
: measurements.chestCircumference * (1 + options.chestEase) * (1 - options.ribbingStretch)
|
||||
|
||||
// We only print a part, unless complete is false in which case
|
||||
// we print the entire thing (because laser cutters and so on)
|
||||
points.topLeft = new Point(0, 0)
|
||||
points.bottomLeft = new Point(0, width)
|
||||
points.topMidLeft = new Point(width, 0)
|
||||
points.bottomMidLeft = new Point(width, width)
|
||||
points.topMidRight = new Point(width * 1.5, 0)
|
||||
points.bottomMidRight = new Point(width * 1.5, width)
|
||||
points.topRight = new Point(width * 2.5, 0)
|
||||
points.bottomRight = new Point(width * 2.5, width)
|
||||
points.topRight = new Point(length, 0)
|
||||
points.bottomRight = new Point(length, width)
|
||||
|
||||
if (complete) {
|
||||
paths.seam = new Path()
|
||||
.move(points.topMidLeft)
|
||||
.line(points.topLeft)
|
||||
|
@ -40,6 +46,15 @@ export default function(part) {
|
|||
.move(points.bottomMidLeft)
|
||||
.line(points.bottomMidRight)
|
||||
.attr('class', 'fabric dashed')
|
||||
} else {
|
||||
paths.seam = new Path()
|
||||
.move(points.topLeft)
|
||||
.line(points.bottomLeft)
|
||||
.line(points.bottomRight)
|
||||
.line(points.topRight)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
}
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue