chore: Linter warnings
This commit is contained in:
parent
d0447c0f77
commit
182c4f4d64
5 changed files with 8 additions and 45 deletions
|
@ -1,5 +1,4 @@
|
||||||
import { pluginBundle } from '@freesewing/plugin-bundle'
|
import { pluginBundle } from '@freesewing/plugin-bundle'
|
||||||
import { version } from '../data.mjs'
|
|
||||||
|
|
||||||
export const front = {
|
export const front = {
|
||||||
name: 'albert.front',
|
name: 'albert.front',
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { annotationsPlugin } from '@freesewing/plugin-annotations'
|
import { annotationsPlugin } from '@freesewing/plugin-annotations'
|
||||||
import { base } from './base.mjs'
|
import { base } from './base.mjs'
|
||||||
import { version } from '../data.mjs'
|
|
||||||
|
|
||||||
const snippies = [
|
const snippies = [
|
||||||
'button',
|
'button',
|
||||||
|
@ -13,15 +12,6 @@ const snippies = [
|
||||||
'bnotch',
|
'bnotch',
|
||||||
]
|
]
|
||||||
|
|
||||||
const bartackOptions = (options) => ({
|
|
||||||
angle: options.bartackAngle,
|
|
||||||
length: options.bartackLength,
|
|
||||||
density: options.bartackDensity,
|
|
||||||
width: options.bartackWidth,
|
|
||||||
start: options.bartackStart,
|
|
||||||
end: options.bartackEnd,
|
|
||||||
})
|
|
||||||
|
|
||||||
const pluginAnnotations = ({
|
const pluginAnnotations = ({
|
||||||
points,
|
points,
|
||||||
Point,
|
Point,
|
||||||
|
@ -307,10 +297,6 @@ const pluginAnnotations = ({
|
||||||
|
|
||||||
// macro = miniscale
|
// macro = miniscale
|
||||||
points.miniscale = new Point(310, 138)
|
points.miniscale = new Point(310, 138)
|
||||||
const minscaleboxOptions = {
|
|
||||||
at: points.scalebox,
|
|
||||||
rotate: options.scaleboxRotation,
|
|
||||||
}
|
|
||||||
macro('miniscale', {
|
macro('miniscale', {
|
||||||
at: points.miniscale,
|
at: points.miniscale,
|
||||||
rotate: options.scaleboxRotation,
|
rotate: options.scaleboxRotation,
|
||||||
|
|
|
@ -490,7 +490,7 @@ Path.prototype.intersectsY = function (y) {
|
||||||
Path.prototype.join = function (that, closed = false) {
|
Path.prototype.join = function (that, closed = false) {
|
||||||
if (that instanceof Path !== true)
|
if (that instanceof Path !== true)
|
||||||
this.log.error('Called `Path.join(that)` but `that` is not a `Path` object')
|
this.log.error('Called `Path.join(that)` but `that` is not a `Path` object')
|
||||||
return __joinPaths([this, that], closed, this.log)
|
return __joinPaths([this, that], closed)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -843,8 +843,8 @@ Path.prototype.split = function (point) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (firstHalf.length > 0) firstHalf = __joinPaths(firstHalf, false, this.log)
|
if (firstHalf.length > 0) firstHalf = __joinPaths(firstHalf, false)
|
||||||
if (secondHalf.length > 0) secondHalf = __joinPaths(secondHalf, false, this.log)
|
if (secondHalf.length > 0) secondHalf = __joinPaths(secondHalf, false)
|
||||||
|
|
||||||
return [firstHalf, secondHalf]
|
return [firstHalf, secondHalf]
|
||||||
}
|
}
|
||||||
|
@ -930,9 +930,9 @@ Path.prototype.trim = function () {
|
||||||
first = false
|
first = false
|
||||||
}
|
}
|
||||||
let joint
|
let joint
|
||||||
if (trimmedStart.length > 0) joint = __joinPaths(trimmedStart, false, this.log).join(glue)
|
if (trimmedStart.length > 0) joint = __joinPaths(trimmedStart, false).join(glue)
|
||||||
else joint = glue
|
else joint = glue
|
||||||
if (trimmedEnd.length > 0) joint = joint.join(__joinPaths(trimmedEnd, false, this.log))
|
if (trimmedEnd.length > 0) joint = joint.join(__joinPaths(trimmedEnd, false))
|
||||||
|
|
||||||
return joint.trim()
|
return joint.trim()
|
||||||
}
|
}
|
||||||
|
@ -1317,7 +1317,7 @@ function __pathOffset(path, distance, log) {
|
||||||
if (!start) start = current
|
if (!start) start = current
|
||||||
}
|
}
|
||||||
|
|
||||||
return __joinPaths(offset, closed, log)
|
return __joinPaths(offset, closed)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -216,7 +216,7 @@ Pattern.prototype.getRenderProps = function () {
|
||||||
...set[p].asProps(),
|
...set[p].asProps(),
|
||||||
store: this.setStores[set[p].set],
|
store: this.setStores[set[p].set],
|
||||||
}
|
}
|
||||||
} else if (this.setStores[set?.set]) {
|
} else if (this.setStores[set.set]) {
|
||||||
this.setStores[set.set].log.info(
|
this.setStores[set.set].log.info(
|
||||||
`Part${p} is hidden in set ${set.set}. Not adding to render props`
|
`Part${p} is hidden in set ${set.set}. Not adding to render props`
|
||||||
)
|
)
|
||||||
|
@ -383,7 +383,7 @@ Pattern.prototype.__applySettings = function (sets) {
|
||||||
if (!Array.isArray(sets)) throw 'Sets should be an array of settings objects'
|
if (!Array.isArray(sets)) throw 'Sets should be an array of settings objects'
|
||||||
if (sets.length === 0) sets.push({}) // Required to load default settings
|
if (sets.length === 0) sets.push({}) // Required to load default settings
|
||||||
this.settings = []
|
this.settings = []
|
||||||
for (const i in sets) {
|
for (let i = 0; i < sets.length; i++) {
|
||||||
// Don't mutate the input itself
|
// Don't mutate the input itself
|
||||||
const set = { ...sets[i] }
|
const set = { ...sets[i] }
|
||||||
if (!set.options) set.options = {}
|
if (!set.options) set.options = {}
|
||||||
|
|
|
@ -1,25 +1,3 @@
|
||||||
const style = `
|
|
||||||
text.title-nr {
|
|
||||||
font-size: 24pt;
|
|
||||||
font-weight: 700;
|
|
||||||
text-anchor: middle;
|
|
||||||
dominant-baseline: reset-size;
|
|
||||||
}
|
|
||||||
text.title-name {
|
|
||||||
font-size: 7pt;
|
|
||||||
font-weight: 500;
|
|
||||||
text-anchor: middle;
|
|
||||||
dominant-baseline: reset-size;
|
|
||||||
}
|
|
||||||
text.title-pattern {
|
|
||||||
font-size: 4pt;
|
|
||||||
font-weight: 500;
|
|
||||||
dominant-baseline: reset-size;
|
|
||||||
text-anchor: middle;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
const titleMacro = function (so, { points, scale, locale, store }) {
|
const titleMacro = function (so, { points, scale, locale, store }) {
|
||||||
const prefix = so.prefix || ''
|
const prefix = so.prefix || ''
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue