1
0
Fork 0

sparkles: Switched to freesewing.create

This commit is contained in:
Joost De Cock 2019-02-09 13:50:57 +01:00
parent dc2953c540
commit 2a908fa92d
3 changed files with 10 additions and 22 deletions

View file

@ -19,20 +19,8 @@ import draftSleevePlacketUnderlap from "./sleeveplacket-underlap";
import draftSleevePlacketOverlap from "./sleeveplacket-overlap";
import draftCuff from "./cuff";
// Constructor
const Simon = function(settings) {
freesewing.Pattern.call(this, config);
this.use(plugins)
.use(flipPlugin)
.use(buttonPlugin)
.apply(settings);
return this;
};
// Set up inheritance
Simon.prototype = Object.create(freesewing.Pattern.prototype);
Simon.prototype.constructor = Simon;
// Create pattern
const Simon = freesewing.create(config, [plugins, flipPlugin, buttonPlugin]);
// Attach per-part draft methods to prototype
Simon.prototype.draftBase = function(part) {