Fix drafting error by converting vent count to number before comparing
This commit is contained in:
parent
beddcfa188
commit
aa2d236f7a
2 changed files with 9 additions and 8 deletions
|
@ -18,7 +18,7 @@ function jaegerBack({
|
||||||
}) {
|
}) {
|
||||||
// Back vent(s)
|
// Back vent(s)
|
||||||
const ventY = points.cbHips.y - points.cbWaistCp2.dy(points.cbHips) * options.backVentLength
|
const ventY = points.cbHips.y - points.cbWaistCp2.dy(points.cbHips) * options.backVentLength
|
||||||
if (options.backVent === 1) {
|
if (Number(options.backVent) === 1) {
|
||||||
// Single back vent
|
// Single back vent
|
||||||
// Vent tip
|
// Vent tip
|
||||||
points.ventStart = utils.curveIntersectsY(
|
points.ventStart = utils.curveIntersectsY(
|
||||||
|
@ -44,7 +44,7 @@ function jaegerBack({
|
||||||
points.cbWaistCp2,
|
points.cbWaistCp2,
|
||||||
points.cbWaist
|
points.cbWaist
|
||||||
)
|
)
|
||||||
} else if (options.backVent === 2) {
|
} else if (Number(options.backVent) === 2) {
|
||||||
// Double back vent
|
// Double back vent
|
||||||
// Vent tip
|
// Vent tip
|
||||||
points.ventStart = utils.curveIntersectsY(
|
points.ventStart = utils.curveIntersectsY(
|
||||||
|
@ -80,7 +80,7 @@ function jaegerBack({
|
||||||
for (let i of Object.keys(snippets)) delete snippets[i]
|
for (let i of Object.keys(snippets)) delete snippets[i]
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
if (options.backVent === 2) {
|
if (Number(options.backVent) === 2) {
|
||||||
paths.saBase = paths.vent
|
paths.saBase = paths.vent
|
||||||
.clone()
|
.clone()
|
||||||
.reverse()
|
.reverse()
|
||||||
|
@ -109,7 +109,7 @@ function jaegerBack({
|
||||||
paths.saBase = paths.saBase._curve(points.cbChestCp1, points.cbChest)
|
paths.saBase = paths.saBase._curve(points.cbChestCp1, points.cbChest)
|
||||||
else paths.saBase = paths.saBase.line(points.cbChest)
|
else paths.saBase = paths.saBase.line(points.cbChest)
|
||||||
paths.saBase = paths.saBase.curve(points.cbChestCp2, points.cbWaistCp1, points.cbWaist)
|
paths.saBase = paths.saBase.curve(points.cbChestCp2, points.cbWaistCp1, points.cbWaist)
|
||||||
if (options.backVent === 1) {
|
if (Number(options.backVent) === 1) {
|
||||||
paths.saBase = paths.saBase
|
paths.saBase = paths.saBase
|
||||||
.join(
|
.join(
|
||||||
new Path()
|
new Path()
|
||||||
|
@ -126,8 +126,9 @@ function jaegerBack({
|
||||||
}
|
}
|
||||||
paths.saBase.hide()
|
paths.saBase.hide()
|
||||||
|
|
||||||
if (options.backVent === 2) paths.hemBase = new Path().move(points.cbHem).line(paths.vent.end())
|
if (Number(options.backVent) === 2)
|
||||||
else if (options.backVent === 1)
|
paths.hemBase = new Path().move(points.cbHem).line(paths.vent.end())
|
||||||
|
else if (Number(options.backVent) === 1)
|
||||||
paths.hemBase = new Path().move(paths.vent.end()).line(points.hem)
|
paths.hemBase = new Path().move(paths.vent.end()).line(points.hem)
|
||||||
else paths.hemBase = new Path().move(points.cbHem).line(points.hem)
|
else paths.hemBase = new Path().move(points.cbHem).line(points.hem)
|
||||||
paths.hemBase.hide()
|
paths.hemBase.hide()
|
||||||
|
|
|
@ -17,7 +17,7 @@ function jaegerSide({
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
// Double back vent
|
// Double back vent
|
||||||
if (options.backVent === 2) {
|
if (Number(options.backVent) === 2) {
|
||||||
let ventY = points.bsHips.y - points.bsWaistCp1.dy(points.bsHips) * options.backVentLength
|
let ventY = points.bsHips.y - points.bsWaistCp1.dy(points.bsHips) * options.backVentLength
|
||||||
// Vent tip
|
// Vent tip
|
||||||
points.ventStart = utils.curveIntersectsY(
|
points.ventStart = utils.curveIntersectsY(
|
||||||
|
@ -57,7 +57,7 @@ function jaegerSide({
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
paths.hemBase = new Path().move(points.sideHem).line(points.bsHem)
|
paths.hemBase = new Path().move(points.sideHem).line(points.bsHem)
|
||||||
if (options.backVent === 2) {
|
if (Number(options.backVent === 2)) {
|
||||||
paths.hemBase.line(points.ventHem).line(paths.vent.end())
|
paths.hemBase.line(points.ventHem).line(paths.vent.end())
|
||||||
paths.saBase = paths.vent
|
paths.saBase = paths.vent
|
||||||
.clone()
|
.clone()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue