diff --git a/designs/albert/src/front.mjs b/designs/albert/src/front.mjs index e256bbee22b..7eda43a6dc7 100644 --- a/designs/albert/src/front.mjs +++ b/designs/albert/src/front.mjs @@ -1,5 +1,4 @@ import { pluginBundle } from '@freesewing/plugin-bundle' -import { version } from '../data.mjs' export const front = { name: 'albert.front', diff --git a/designs/plugintest/src/plugin-annotations.mjs b/designs/plugintest/src/plugin-annotations.mjs index c6a861ebdc8..3fb2d03e5d6 100644 --- a/designs/plugintest/src/plugin-annotations.mjs +++ b/designs/plugintest/src/plugin-annotations.mjs @@ -1,6 +1,5 @@ import { annotationsPlugin } from '@freesewing/plugin-annotations' import { base } from './base.mjs' -import { version } from '../data.mjs' const snippies = [ 'button', @@ -13,15 +12,6 @@ const snippies = [ 'bnotch', ] -const bartackOptions = (options) => ({ - angle: options.bartackAngle, - length: options.bartackLength, - density: options.bartackDensity, - width: options.bartackWidth, - start: options.bartackStart, - end: options.bartackEnd, -}) - const pluginAnnotations = ({ points, Point, @@ -307,10 +297,6 @@ const pluginAnnotations = ({ // macro = miniscale points.miniscale = new Point(310, 138) - const minscaleboxOptions = { - at: points.scalebox, - rotate: options.scaleboxRotation, - } macro('miniscale', { at: points.miniscale, rotate: options.scaleboxRotation, diff --git a/packages/core/src/path.mjs b/packages/core/src/path.mjs index 8f4df2f284d..60d94747c38 100644 --- a/packages/core/src/path.mjs +++ b/packages/core/src/path.mjs @@ -490,7 +490,7 @@ Path.prototype.intersectsY = function (y) { Path.prototype.join = function (that, closed = false) { if (that instanceof Path !== true) 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 (secondHalf.length > 0) secondHalf = __joinPaths(secondHalf, false, this.log) + if (firstHalf.length > 0) firstHalf = __joinPaths(firstHalf, false) + if (secondHalf.length > 0) secondHalf = __joinPaths(secondHalf, false) return [firstHalf, secondHalf] } @@ -930,9 +930,9 @@ Path.prototype.trim = function () { first = false } 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 - 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() } @@ -1317,7 +1317,7 @@ function __pathOffset(path, distance, log) { if (!start) start = current } - return __joinPaths(offset, closed, log) + return __joinPaths(offset, closed) } /** diff --git a/packages/core/src/pattern.mjs b/packages/core/src/pattern.mjs index e01f3cdbd60..e747edc11ae 100644 --- a/packages/core/src/pattern.mjs +++ b/packages/core/src/pattern.mjs @@ -216,7 +216,7 @@ Pattern.prototype.getRenderProps = function () { ...set[p].asProps(), store: this.setStores[set[p].set], } - } else if (this.setStores[set?.set]) { + } else if (this.setStores[set.set]) { this.setStores[set.set].log.info( `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 (sets.length === 0) sets.push({}) // Required to load default settings this.settings = [] - for (const i in sets) { + for (let i = 0; i < sets.length; i++) { // Don't mutate the input itself const set = { ...sets[i] } if (!set.options) set.options = {} diff --git a/plugins/plugin-annotations/src/title.mjs b/plugins/plugin-annotations/src/title.mjs index a1d218099c6..602522a594b 100644 --- a/plugins/plugin-annotations/src/title.mjs +++ b/plugins/plugin-annotations/src/title.mjs @@ -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 prefix = so.prefix || ''