sparkles: Switched placket types to bool options
This commit is contained in:
parent
329bb0d662
commit
df7342ec10
10 changed files with 23 additions and 36 deletions
|
@ -19,7 +19,7 @@ export default part => {
|
|||
} = part.shorthand();
|
||||
|
||||
if (
|
||||
options.buttonholePlacketType !== "seperate" ||
|
||||
!options.seperateButtonholePlacket ||
|
||||
options.buttonholePlacketStyle !== "classic"
|
||||
) {
|
||||
part.paths = {};
|
||||
|
|
|
@ -19,7 +19,7 @@ export default part => {
|
|||
} = part.shorthand();
|
||||
|
||||
if (
|
||||
options.buttonPlacketType !== "seperate" ||
|
||||
!options.seperateButtonPlacket ||
|
||||
options.buttonPlacketStyle !== "classic"
|
||||
) {
|
||||
part.paths = {};
|
||||
|
|
|
@ -17,7 +17,7 @@ export default part => {
|
|||
|
||||
return options.buttonholePlacketStyle === "seamless"
|
||||
? frontLeftSeamless(part)
|
||||
: options.buttonholePlacketType === "seperate"
|
||||
: seperateButtonholePlacket
|
||||
? frontLeftClassicSeperate(part)
|
||||
: frontLeftClassicCuton(part);
|
||||
};
|
||||
|
|
|
@ -30,7 +30,7 @@ export default part => {
|
|||
|
||||
return options.buttonPlacketStyle === "seamless"
|
||||
? frontRightSeamless(part)
|
||||
: options.buttonPlacketType === "seperate"
|
||||
: options.seperateButtonPlacket
|
||||
? frontRightClassicSeperate(part)
|
||||
: frontRightClassicCuton(part);
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@ import Brian from "@freesewing/brian";
|
|||
import plugins from "@freesewing/plugin-bundle";
|
||||
import flipPlugin from "@freesewing/plugin-flip";
|
||||
import buttonPlugin from "@freesewing/plugin-buttons";
|
||||
import config from "../config/config";
|
||||
import config from "../config";
|
||||
// Parts
|
||||
import draftBack from "./back";
|
||||
import draftFront from "./front";
|
||||
|
|
|
@ -31,7 +31,7 @@ export const addButtons = function(
|
|||
);
|
||||
snippets[snippet + i] = new Snippet(snippet, points["button" + i]);
|
||||
}
|
||||
if (options.extraTopButton === "yes")
|
||||
if (options.extraTopButton)
|
||||
snippets["top" + snippet] = new Snippet(
|
||||
snippet,
|
||||
points[origin].shift(-90, len / options.buttons / 2)
|
||||
|
@ -96,7 +96,7 @@ export const decorateBarrelCuff = part => {
|
|||
"buttonhole",
|
||||
points["buttonhole" + i]
|
||||
).attr("data-rotate", 90);
|
||||
if (options.barrelcuffNarrowButton === "yes") {
|
||||
if (options.barrelCuffNarrowButton) {
|
||||
points["narrowButton" + i] = points["button" + i].shift(180, margin);
|
||||
snippets["narrowButton" + i] = new Snippet(
|
||||
"button",
|
||||
|
@ -206,7 +206,7 @@ export const paperlessBarrelCuff = part => {
|
|||
to: points.topLeft.shift(0, 40),
|
||||
x: points.bottomLeft.x - 15 - sa
|
||||
});
|
||||
if (options.barrelcuffNarrowButton === "yes") {
|
||||
if (options.barrelCuffNarrowButton) {
|
||||
macro("hd", {
|
||||
from: points.narrowButton1,
|
||||
to: points.button1,
|
||||
|
|
|
@ -30,7 +30,7 @@ export default part => {
|
|||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
||||
.line(points.neck)
|
||||
.curve_(points.neckCp2, points.cbNeck);
|
||||
if (options.splitYoke === "yes")
|
||||
if (options.splitYoke)
|
||||
paths.saBase = paths.saBase.line(points.cbYoke).close();
|
||||
paths.seam = paths.saBase.clone();
|
||||
paths.saBase.render = false;
|
||||
|
@ -44,7 +44,7 @@ export default part => {
|
|||
points.logo = points.title.shift(-90, 50);
|
||||
snippets.logo = new Snippet("logo", points.logo);
|
||||
snippets.logo.attr("data-scale", 0.8);
|
||||
if (options.splitYoke === "yes") {
|
||||
if (options.splitYoke) {
|
||||
points.grainlineFrom = points.cbYoke.shift(0, 20);
|
||||
points.grainlineTo = points.cbNeck.shift(0, 20);
|
||||
macro("grainline", {
|
||||
|
@ -66,7 +66,7 @@ export default part => {
|
|||
|
||||
if (sa) {
|
||||
paths.sa = paths.saBase.offset(sa).attr("class", "fabric sa");
|
||||
if (options.splitYoke === "no") {
|
||||
if (options.splitYoke) {
|
||||
paths.sa = paths.sa
|
||||
.line(points.cbNeck)
|
||||
.move(points.cbYoke)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue