chore: Linter
This commit is contained in:
parent
adb9e93024
commit
1a46c8e724
227 changed files with 660 additions and 936 deletions
|
@ -1,6 +1,6 @@
|
|||
import { addButtons } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let {
|
||||
utils,
|
||||
sa,
|
||||
|
@ -49,10 +49,7 @@ export default part => {
|
|||
.line(points.placketTopEdge)
|
||||
.line(points.placketBottomEdge)
|
||||
|
||||
paths.seam = paths.saBase
|
||||
.clone()
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
paths.seam = paths.saBase.clone().close().attr('class', 'fabric')
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { draftBarrelCuff, decorateBarrelCuff, paperlessBarrelCuff } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { store, sa, points, Path, paths, complete, paperless, macro } = part.shorthand()
|
||||
|
||||
draftBarrelCuff(part)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { draftBarrelCuff, decorateBarrelCuff, paperlessBarrelCuff } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { store, sa, points, Path, paths, complete, paperless, macro } = part.shorthand()
|
||||
|
||||
draftBarrelCuff(part)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { draftBarrelCuff, decorateBarrelCuff, paperlessBarrelCuff } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { sa, points, Path, paths, complete, paperless } = part.shorthand()
|
||||
|
||||
draftBarrelCuff(part)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { draftFrenchCuff, decorateFrenchCuff, paperlessFrenchCuff } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { store, sa, points, Path, paths, complete, paperless } = part.shorthand()
|
||||
|
||||
draftFrenchCuff(part)
|
||||
|
@ -28,10 +28,7 @@ export default part => {
|
|||
.close()
|
||||
.attr('class', 'fabric')
|
||||
|
||||
paths.fold = new Path()
|
||||
.move(points.midLeft)
|
||||
.line(points.midRight)
|
||||
.attr('class', 'dotted')
|
||||
paths.fold = new Path().move(points.midLeft).line(points.midRight).attr('class', 'dotted')
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { draftFrenchCuff, decorateFrenchCuff, paperlessFrenchCuff } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { store, sa, points, Path, paths, complete, paperless, macro } = part.shorthand()
|
||||
draftFrenchCuff(part)
|
||||
let height = store.get('cuffHeight')
|
||||
|
@ -46,10 +46,7 @@ export default part => {
|
|||
.close()
|
||||
.attr('class', 'fabric')
|
||||
|
||||
paths.fold = new Path()
|
||||
.move(points.midLeft)
|
||||
.line(points.midRight)
|
||||
.attr('class', 'dotted')
|
||||
paths.fold = new Path().move(points.midLeft).line(points.midRight).attr('class', 'dotted')
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { draftFrenchCuff, decorateFrenchCuff, paperlessFrenchCuff } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { sa, points, Path, paths, complete, paperless } = part.shorthand()
|
||||
|
||||
draftFrenchCuff(part)
|
||||
|
@ -14,10 +14,7 @@ export default part => {
|
|||
.close()
|
||||
.attr('class', 'fabric')
|
||||
|
||||
paths.fold = new Path()
|
||||
.move(points.midLeft)
|
||||
.line(points.midRight)
|
||||
.attr('class', 'dotted')
|
||||
paths.fold = new Path().move(points.midLeft).line(points.midRight).attr('class', 'dotted')
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import straightFrenchCuff from './cuff-french-straight'
|
|||
import angledFrenchCuff from './cuff-french-angled'
|
||||
import roundedFrenchCuff from './cuff-french-rounded'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { options } = part.shorthand()
|
||||
switch (options.cuffStyle) {
|
||||
case 'roundedBarrelCuff':
|
||||
|
|
|
@ -110,15 +110,7 @@ export default (part) => {
|
|||
macro('title', { at: points.title, nr: 'X', title: 'front' })
|
||||
macro('sprinkle', {
|
||||
snippet: 'notch',
|
||||
on: [
|
||||
'waist',
|
||||
'armholePitch',
|
||||
'hips',
|
||||
'cfHips',
|
||||
'cfWaist',
|
||||
'armhole',
|
||||
'cfArmhole'
|
||||
]
|
||||
on: ['waist', 'armholePitch', 'hips', 'cfHips', 'cfWaist', 'armhole', 'cfArmhole']
|
||||
})
|
||||
|
||||
if (sa) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { addButtonHoles } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let {
|
||||
sa,
|
||||
Point,
|
||||
|
@ -33,10 +33,7 @@ export default part => {
|
|||
points.placketTopEdge = points.placketTopOuterEdgeFold.shift(180, width)
|
||||
points.placketBottomEdge = points.placketBottomOuterEdgeFold.shift(180, width)
|
||||
|
||||
paths.seam
|
||||
.line(points.placketTopEdge)
|
||||
.line(points.placketBottomEdge)
|
||||
.close()
|
||||
paths.seam.line(points.placketTopEdge).line(points.placketBottomEdge).close()
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
|
@ -66,7 +63,7 @@ export default part => {
|
|||
.line(points.placketTopOuterEdgeOver)
|
||||
.attr('class', 'dotted')
|
||||
.attr('data-text', 'matchHere')
|
||||
.attr("data-text-class", "text-xs center")
|
||||
.attr('data-text-class', 'text-xs center')
|
||||
paths.placketOuterEdgeUnder = new Path()
|
||||
.move(points.placketTopOuterEdgeUnder)
|
||||
.line(points.placketBottomOuterEdgeUnder)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default part => {
|
||||
export default (part) => {
|
||||
let {
|
||||
utils,
|
||||
sa,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { addButtonHoles } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { sa, points, Path, paths, complete, paperless, macro, options } = part.shorthand()
|
||||
let width = options.buttonholePlacketWidth
|
||||
points.placketCfNeck = points.cfNeck
|
||||
|
@ -11,24 +11,18 @@ export default part => {
|
|||
points.placketBottomFold2 = points.cfHem.shift(180, width * 1.5)
|
||||
points.placketBottomEdge = points.cfHem.shift(180, width * 2.5)
|
||||
|
||||
paths.seam
|
||||
.line(points.placketTopEdge)
|
||||
.line(points.placketBottomEdge)
|
||||
.close()
|
||||
paths.seam.line(points.placketTopEdge).line(points.placketBottomEdge).close()
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
// Placket help lines
|
||||
paths.frontCenter = new Path()
|
||||
.move(points.cfNeck)
|
||||
.line(points.cfHem)
|
||||
.attr('class', 'help')
|
||||
paths.frontCenter = new Path().move(points.cfNeck).line(points.cfHem).attr('class', 'help')
|
||||
paths.placketFold1 = new Path()
|
||||
.move(points.placketBottomFold1)
|
||||
.line(points.placketTopFold1)
|
||||
.attr('class', 'dotted')
|
||||
.attr('data-text', 'matchHere')
|
||||
.attr("data-text-class", "text-xs center")
|
||||
.attr('data-text-class', 'text-xs center')
|
||||
paths.placketFold2 = new Path()
|
||||
.move(points.placketBottomFold2)
|
||||
.line(points.placketTopFold2)
|
||||
|
|
|
@ -3,7 +3,7 @@ import frontLeftClassicSeperate from './frontleft-classic-seperate'
|
|||
import frontLeftClassicCuton from './frontleft-classic-cuton'
|
||||
import frontLeftSeamless from './frontleft-seamless'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { sa, options, complete, paperless, points, macro } = part.shorthand()
|
||||
|
||||
if (complete && paperless) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { addButtons } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let {
|
||||
utils,
|
||||
sa,
|
||||
|
@ -29,25 +29,18 @@ export default part => {
|
|||
points.placketBottomOut = points.cfHem.shift(0, width / 2)
|
||||
points.placketBottomEdge = points.cfHem.shift(0, width * 1.5)
|
||||
|
||||
paths.seam
|
||||
.line(points.placketTopEdge)
|
||||
.line(points.placketBottomEdge)
|
||||
.line(points.cfHem)
|
||||
.close()
|
||||
paths.seam.line(points.placketTopEdge).line(points.placketBottomEdge).line(points.cfHem).close()
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
// Placket help lines
|
||||
paths.frontCenter = new Path()
|
||||
.move(points.cfNeck)
|
||||
.line(points.cfHem)
|
||||
.attr('class', 'help')
|
||||
paths.frontCenter = new Path().move(points.cfNeck).line(points.cfHem).attr('class', 'help')
|
||||
paths.placketInnerFold = new Path()
|
||||
.move(points.placketBottomIn)
|
||||
.line(points.placketTopIn)
|
||||
.attr('class', 'dotted')
|
||||
.attr('data-text', 'matchHere')
|
||||
.attr("data-text-class", "text-xs center")
|
||||
.attr('data-text-class', 'text-xs center')
|
||||
paths.placketOuterFold = new Path()
|
||||
.move(points.placketTopOut)
|
||||
.line(points.placketBottomOut)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default part => {
|
||||
export default (part) => {
|
||||
let {
|
||||
snippets,
|
||||
utils,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { addButtons } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { sa, Point, points, Path, paths, complete, paperless, macro, options } = part.shorthand()
|
||||
|
||||
let width = options.buttonPlacketWidth
|
||||
|
@ -12,19 +12,12 @@ export default part => {
|
|||
points.placketBottomEdge = points.cfHem.shift(0, width * 2.5)
|
||||
points.placketBottomMatch = points.cfHem.shift(180, width / 2)
|
||||
points.placketTopMatch = points.cfNeck.shift(180, width / 2)
|
||||
paths.seam
|
||||
.line(points.placketTopEdge)
|
||||
.line(points.placketBottomEdge)
|
||||
.line(points.cfHem)
|
||||
.close()
|
||||
paths.seam.line(points.placketTopEdge).line(points.placketBottomEdge).line(points.cfHem).close()
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
// Placket help lines
|
||||
paths.frontCenter = new Path()
|
||||
.move(points.cfNeck)
|
||||
.line(points.cfHem)
|
||||
.attr('class', 'help')
|
||||
paths.frontCenter = new Path().move(points.cfNeck).line(points.cfHem).attr('class', 'help')
|
||||
paths.placketFold1 = new Path()
|
||||
.move(points.placketTopFold1)
|
||||
.line(points.placketBottomFold1)
|
||||
|
@ -38,7 +31,7 @@ export default part => {
|
|||
.line(points.placketTopMatch)
|
||||
.attr('class', 'stroke-sm help')
|
||||
.attr('data-text', 'matchHere')
|
||||
.attr("data-text-class", "text-xs center")
|
||||
.attr('data-text-class', 'text-xs center')
|
||||
macro('sprinkle', {
|
||||
snippet: 'notch',
|
||||
on: [
|
||||
|
|
|
@ -3,7 +3,7 @@ import frontRightClassicSeperate from './frontright-classic-seperate'
|
|||
import frontRightClassicCuton from './frontright-classic-cuton'
|
||||
import frontRightSeamless from './frontright-seamless'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
let { sa, options, complete, paperless, points, macro, paths } = part.shorthand()
|
||||
macro('flip')
|
||||
if (complete) {
|
||||
|
|
|
@ -23,16 +23,16 @@ import draftCuff from './cuff'
|
|||
const Pattern = new freesewing.Design(config, [plugins, flipPlugin, buttonPlugin])
|
||||
|
||||
// Attach draft methods to prototype
|
||||
Pattern.prototype.draftBase = function(part) {
|
||||
Pattern.prototype.draftBase = function (part) {
|
||||
return new Brian(this.settings).draftBase(part)
|
||||
}
|
||||
Pattern.prototype.draftFrontBase = function(part) {
|
||||
Pattern.prototype.draftFrontBase = function (part) {
|
||||
return new Brian(this.settings).draftFront(part)
|
||||
}
|
||||
Pattern.prototype.draftBackBase = function(part) {
|
||||
Pattern.prototype.draftBackBase = function (part) {
|
||||
return new Brian(this.settings).draftBack(part)
|
||||
}
|
||||
Pattern.prototype.draftSleeveBase = function(part) {
|
||||
Pattern.prototype.draftSleeveBase = function (part) {
|
||||
let brian = new Brian(this.settings)
|
||||
return brian.draftSleeve(brian.draftSleevecap(part))
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default part => {
|
||||
export default (part) => {
|
||||
let {
|
||||
measurements,
|
||||
sa,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default part => {
|
||||
export default (part) => {
|
||||
let {
|
||||
measurements,
|
||||
sa,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default part => {
|
||||
export default (part) => {
|
||||
let {
|
||||
sa,
|
||||
Point,
|
||||
|
@ -66,10 +66,7 @@ export default part => {
|
|||
if (sa) {
|
||||
paths.sa = paths.saBase.offset(sa).attr('class', 'fabric sa')
|
||||
if (options.splitYoke) {
|
||||
paths.sa = paths.sa
|
||||
.line(points.cbNeck)
|
||||
.move(points.cbYoke)
|
||||
.line(paths.sa.start())
|
||||
paths.sa = paths.sa.line(points.cbNeck).move(points.cbYoke).line(paths.sa.start())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue