fix(simon): Support undetailed paperless draft. See #1280
This commit is contained in:
parent
e0fe1c7e5f
commit
f9c95b448b
6 changed files with 92 additions and 76 deletions
|
@ -148,15 +148,17 @@ export default (part) => {
|
||||||
to: points.armhole,
|
to: points.armhole,
|
||||||
y: points.placketTopEdge.y - offset - sa - 45,
|
y: points.placketTopEdge.y - offset - sa - 45,
|
||||||
})
|
})
|
||||||
points.button0 = points.placketTopEdge
|
if (complete) {
|
||||||
let j
|
points.button0 = points.placketTopEdge
|
||||||
for (let i = 0; i < options.buttons; i++) {
|
let j
|
||||||
j = i + 1
|
for (let i = 0; i < options.buttons; i++) {
|
||||||
macro('vd', {
|
j = i + 1
|
||||||
from: points['button' + j],
|
macro('vd', {
|
||||||
to: points['button' + i],
|
from: points['button' + j],
|
||||||
x: points.placketTopEdge.x - 15,
|
to: points['button' + i],
|
||||||
})
|
x: points.placketTopEdge.x - 15,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.placketBottomEdge,
|
from: points.placketBottomEdge,
|
||||||
|
|
|
@ -81,15 +81,17 @@ export default (part) => {
|
||||||
to: points.armhole,
|
to: points.armhole,
|
||||||
y: points.s3CollarSplit.y - 45 - sa,
|
y: points.s3CollarSplit.y - 45 - sa,
|
||||||
})
|
})
|
||||||
points.button0 = points.placketTopEdge
|
if (complete) {
|
||||||
let j
|
points.button0 = points.placketTopEdge
|
||||||
for (let i = 0; i < options.buttons; i++) {
|
let j
|
||||||
j = i + 1
|
for (let i = 0; i < options.buttons; i++) {
|
||||||
macro('vd', {
|
j = i + 1
|
||||||
from: points['button' + j],
|
macro('vd', {
|
||||||
to: points['button' + i],
|
from: points['button' + j],
|
||||||
x: points.placketTopEdge.x - 15,
|
to: points['button' + i],
|
||||||
})
|
x: points.placketTopEdge.x - 15,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.placketBottomEdge,
|
from: points.placketBottomEdge,
|
||||||
|
|
|
@ -93,15 +93,17 @@ export default (part) => {
|
||||||
to: points.placketTopEdge,
|
to: points.placketTopEdge,
|
||||||
y: points.s3CollarSplit.y - 45 - sa,
|
y: points.s3CollarSplit.y - 45 - sa,
|
||||||
})
|
})
|
||||||
points.button0 = points.placketTopEdge
|
if (complete) {
|
||||||
let j
|
points.button0 = points.placketTopEdge
|
||||||
for (let i = 0; i < options.buttons; i++) {
|
let j
|
||||||
j = i + 1
|
for (let i = 0; i < options.buttons; i++) {
|
||||||
macro('vd', {
|
j = i + 1
|
||||||
from: points['button' + j],
|
macro('vd', {
|
||||||
to: points['button' + i],
|
from: points['button' + j],
|
||||||
x: points.placketTopEdge.x + 15 + sa,
|
to: points['button' + i],
|
||||||
})
|
x: points.placketTopEdge.x + 15 + sa,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.placketBottomEdge,
|
from: points.placketBottomEdge,
|
||||||
|
|
|
@ -141,12 +141,14 @@ export const decorateFrenchCuff = (part) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const paperlessBarrelCuff = (part) => {
|
export const paperlessBarrelCuff = (part) => {
|
||||||
let { sa, macro, points, options } = part.shorthand()
|
let { sa, macro, points, options, complete } = part.shorthand()
|
||||||
macro('hd', {
|
if (complete) {
|
||||||
from: points.buttonhole1,
|
macro('hd', {
|
||||||
to: points.button1,
|
from: points.buttonhole1,
|
||||||
y: points.bottomLeft.y + 15 + sa,
|
to: points.button1,
|
||||||
})
|
y: points.bottomLeft.y + 15 + sa,
|
||||||
|
})
|
||||||
|
}
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.bottomLeft,
|
from: points.bottomLeft,
|
||||||
to: points.bottomRight,
|
to: points.bottomRight,
|
||||||
|
@ -157,14 +159,14 @@ export const paperlessBarrelCuff = (part) => {
|
||||||
to: points.topLeft.shift(0, 40),
|
to: points.topLeft.shift(0, 40),
|
||||||
x: points.bottomLeft.x - 15 - sa,
|
x: points.bottomLeft.x - 15 - sa,
|
||||||
})
|
})
|
||||||
if (options.barrelCuffNarrowButton) {
|
if (complete && options.barrelCuffNarrowButton) {
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.narrowButton1,
|
from: points.narrowButton1,
|
||||||
to: points.button1,
|
to: points.button1,
|
||||||
y: points.topRight.y - 15 - sa,
|
y: points.topRight.y - 15 - sa,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (options.cuffButtonRows === 2) {
|
if (complete && options.cuffButtonRows === 2) {
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.button2,
|
from: points.button2,
|
||||||
to: points.button1,
|
to: points.button1,
|
||||||
|
@ -176,22 +178,24 @@ export const paperlessBarrelCuff = (part) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const paperlessFrenchCuff = (part) => {
|
export const paperlessFrenchCuff = (part) => {
|
||||||
let { sa, macro, points } = part.shorthand()
|
let { sa, macro, points, complete } = part.shorthand()
|
||||||
macro('hd', {
|
if (complete) {
|
||||||
from: points.button4,
|
macro('hd', {
|
||||||
to: points.button2,
|
from: points.button4,
|
||||||
y: points.bottomLeft.y + 15 + sa,
|
to: points.button2,
|
||||||
})
|
y: points.bottomLeft.y + 15 + sa,
|
||||||
|
})
|
||||||
|
macro('vd', {
|
||||||
|
from: points.button2,
|
||||||
|
to: points.button1,
|
||||||
|
x: points.topRight.x + 15 + sa,
|
||||||
|
})
|
||||||
|
}
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.midLeft,
|
from: points.midLeft,
|
||||||
to: points.midRight,
|
to: points.midRight,
|
||||||
y: points.bottomLeft.y + 30 + sa,
|
y: points.bottomLeft.y + 30 + sa,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
|
||||||
from: points.button2,
|
|
||||||
to: points.button1,
|
|
||||||
x: points.topRight.x + 15 + sa,
|
|
||||||
})
|
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.bottomRight.shift(180, 40),
|
from: points.bottomRight.shift(180, 40),
|
||||||
to: points.topRight.shift(180, 40),
|
to: points.topRight.shift(180, 40),
|
||||||
|
|
|
@ -161,16 +161,18 @@ export default (part) => {
|
||||||
|
|
||||||
// Paperless?
|
// Paperless?
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro('hd', {
|
if (complete) {
|
||||||
from: points.backNotch,
|
macro('hd', {
|
||||||
to: points.sleeveTip,
|
from: points.backNotch,
|
||||||
y: points.sleeveTip.y - 15 - sa * options.ffsa,
|
to: points.sleeveTip,
|
||||||
})
|
y: points.sleeveTip.y - 15 - sa * options.ffsa,
|
||||||
macro('hd', {
|
})
|
||||||
from: points.sleeveTip,
|
macro('hd', {
|
||||||
to: points.frontNotch,
|
from: points.sleeveTip,
|
||||||
y: points.sleeveTip.y - 15 - sa * options.ffsa,
|
to: points.frontNotch,
|
||||||
})
|
y: points.sleeveTip.y - 15 - sa * options.ffsa,
|
||||||
|
})
|
||||||
|
}
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.bicepsLeft,
|
from: points.bicepsLeft,
|
||||||
to: points.sleeveTip,
|
to: points.sleeveTip,
|
||||||
|
@ -202,26 +204,28 @@ export default (part) => {
|
||||||
to: points.bicepsRight,
|
to: points.bicepsRight,
|
||||||
x: points.bicepsRight.x + 15 + sa * options.ffsa,
|
x: points.bicepsRight.x + 15 + sa * options.ffsa,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
if (complete) {
|
||||||
from: points.bicepsRight,
|
macro('vd', {
|
||||||
to: points.frontNotch,
|
from: points.bicepsRight,
|
||||||
x: points.bicepsRight.x + 15 + sa * options.ffsa,
|
to: points.frontNotch,
|
||||||
})
|
x: points.bicepsRight.x + 15 + sa * options.ffsa,
|
||||||
|
})
|
||||||
|
macro('vd', {
|
||||||
|
from: points.bicepsLeft,
|
||||||
|
to: points.backNotch,
|
||||||
|
x: points.bicepsLeft.x - 15 - sa,
|
||||||
|
})
|
||||||
|
macro('vd', {
|
||||||
|
from: points.cuffLeftCusp,
|
||||||
|
to: points.placketEnd,
|
||||||
|
x: points.placketEnd.x - 15,
|
||||||
|
})
|
||||||
|
}
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.bicepsRight,
|
from: points.bicepsRight,
|
||||||
to: points.sleeveTip,
|
to: points.sleeveTip,
|
||||||
x: points.bicepsRight.x + 30 + sa * options.ffsa,
|
x: points.bicepsRight.x + 30 + sa * options.ffsa,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
|
||||||
from: points.bicepsLeft,
|
|
||||||
to: points.backNotch,
|
|
||||||
x: points.bicepsLeft.x - 15 - sa,
|
|
||||||
})
|
|
||||||
macro('vd', {
|
|
||||||
from: points.cuffLeftCusp,
|
|
||||||
to: points.placketEnd,
|
|
||||||
x: points.placketEnd.x - 15,
|
|
||||||
})
|
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.wristLeft,
|
from: points.wristLeft,
|
||||||
to: points.wristRight,
|
to: points.wristRight,
|
||||||
|
|
|
@ -83,11 +83,13 @@ export default (part) => {
|
||||||
to: points.topRight,
|
to: points.topRight,
|
||||||
x: points.topRight.x + 30,
|
x: points.topRight.x + 30,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
if (complete) {
|
||||||
from: points.bottomLeft,
|
macro('hd', {
|
||||||
to: points.button,
|
from: points.bottomLeft,
|
||||||
y: points.bottomRight.y + 15,
|
to: points.button,
|
||||||
})
|
y: points.bottomRight.y + 15,
|
||||||
|
})
|
||||||
|
}
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.bottomLeft,
|
from: points.bottomLeft,
|
||||||
to: points.bottomRight,
|
to: points.bottomRight,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue