diff --git a/plugins/plugin-annotations/src/bannerbox.mjs b/plugins/plugin-annotations/src/bannerbox.mjs index 6b068847cef..4ddbbb21a88 100644 --- a/plugins/plugin-annotations/src/bannerbox.mjs +++ b/plugins/plugin-annotations/src/bannerbox.mjs @@ -1,6 +1,6 @@ // Export macros export const bannerboxMacros = { - bannerbox: function (so, { points, Point, paths, Path, getId, macro }) { + bannerbox: function (so, { Point, paths, Path, getId, macro }) { // Spread so settings into defaults so = { topLeft: new Point(0, 0), diff --git a/plugins/plugin-annotations/src/logo.mjs b/plugins/plugin-annotations/src/logo.mjs index 7dfc007e5ff..92639ea4fe2 100644 --- a/plugins/plugin-annotations/src/logo.mjs +++ b/plugins/plugin-annotations/src/logo.mjs @@ -5,9 +5,7 @@ const logo = (scale) => export const logoHooks = { preRender: [ function (svg) { - for (const def of svg.defs) { - if (svg.defs.indexOf('id="logo"') === -1) svg.defs += logo(svg.pattern.settings[0].scale) - } + if (svg.defs.indexOf('id="logo"') === -1) svg.defs += logo(svg.pattern.settings[0].scale) }, ], } diff --git a/plugins/plugin-annotations/src/scalebox.mjs b/plugins/plugin-annotations/src/scalebox.mjs index 53130ce42f1..3c8278fd197 100644 --- a/plugins/plugin-annotations/src/scalebox.mjs +++ b/plugins/plugin-annotations/src/scalebox.mjs @@ -185,7 +185,7 @@ export const scaleboxMacros = { .attr('data-text', `${imperialDisplayHeight}`) .attr('data-text-class', 'text-xs center ') }, - miniscale(so, { store, points, paths, scale, Point, Path }) { + miniscale(so, { points, paths, scale, Point, Path }) { // Passing `false` will remove the miniscale if (so === false) { for (const id of [ diff --git a/plugins/plugin-annotations/src/sewtogether.mjs b/plugins/plugin-annotations/src/sewtogether.mjs index a27d6a4305e..16d2a4aa3f7 100644 --- a/plugins/plugin-annotations/src/sewtogether.mjs +++ b/plugins/plugin-annotations/src/sewtogether.mjs @@ -21,7 +21,7 @@ export const sewtogetherHooks = { // Export macros export const sewtogetherMacros = { - sewTogether: function (so, { points, paths, Path, complete, scale, sa }) { + sewTogether: function (so, { points, paths, Path, complete, sa }) { if (so === false) { delete points.sewtogetherFrom delete points.sewtogetherFromCp diff --git a/plugins/plugin-annotations/tests/sewtogether.test.mjs b/plugins/plugin-annotations/tests/sewtogether.test.mjs index 53ed542c610..c185a271613 100644 --- a/plugins/plugin-annotations/tests/sewtogether.test.mjs +++ b/plugins/plugin-annotations/tests/sewtogether.test.mjs @@ -11,7 +11,7 @@ describe('Sewtogether Plugin Tests', () => { draft: ({ Point, points, macro, part }) => { points.from = new Point(10, 20) points.to = new Point(10, 220) - macro('sewtogether', { + macro('sewTogether', { from: points.from, to: points.to, }) @@ -48,7 +48,7 @@ describe('Sewtogether Plugin Tests', () => { points.from = new Point(10, 20) points.hinge = new Point(40, 110) points.to = new Point(10, 220) - macro('sewtogether', { + macro('sewTogether', { from: points.from, hinge: points.hinge, to: points.to, @@ -72,14 +72,14 @@ describe('Sewtogether Plugin Tests', () => { expect(round(c.ops[1].to.y)).to.equal(120) }) - it('Should run the sewtogether/hinge (with sa) macro', () => { + it('Should run the sewTogether/hinge (with sa) macro', () => { const part = { name: 'test', draft: ({ Point, points, macro, part }) => { points.from = new Point(10, 20) points.hinge = new Point(40, 110) points.to = new Point(10, 220) - macro('sewtogether', { + macro('sewTogether', { from: points.from, hinge: points.hinge, to: points.to,