From 597519fc6b7d648c94f5e26325a111a6dd1dc304 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Sun, 22 Jul 2018 20:42:17 +0200 Subject: [PATCH] construction: Code cleanup --- packages/plugin-title/package-lock.json | 4 ++-- packages/plugin-title/src/index.js | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/plugin-title/package-lock.json b/packages/plugin-title/package-lock.json index 452653c1930..01799ae858f 100644 --- a/packages/plugin-title/package-lock.json +++ b/packages/plugin-title/package-lock.json @@ -1,6 +1,6 @@ { - "name": "@freesewing-plugins/macro-cutonfold", - "version": "0.2.2", + "name": "@freesewing-plugins/macro-title", + "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/plugin-title/src/index.js b/packages/plugin-title/src/index.js index 17d4ab6edae..b65c6824d21 100644 --- a/packages/plugin-title/src/index.js +++ b/packages/plugin-title/src/index.js @@ -13,13 +13,11 @@ module.exports = { } , macros: { title: function(next, so) { - let points = this.points; - so.at.attr('data-text', so.nr) - .attr('data-text-class', 'title-nr'); - points.titleName = so.at.shift(-90, 20) + so.at.attr('data-text', so.nr).attr('data-text-class', 'title-nr'); + this.points.titleName = so.at.shift(-90, 20) .attr('data-text', title) .attr('data-text-class', 'title-name'); - points.titlePattern = so.at.shift(-90, 40) + this.points.titlePattern = so.at.shift(-90, 40) .attr('data-text', pattern) .attr('data-text-class', 'title-pattern'); next();