2019-04-29 09:01:51 +02:00
|
|
|
import freesewing from "@freesewing/core";
|
2019-03-16 11:39:06 +01:00
|
|
|
import plugins from "@freesewing/plugin-bundle";
|
2019-03-16 16:35:33 +01:00
|
|
|
import buttons from "@freesewing/plugin-buttons";
|
2019-03-16 11:39:06 +01:00
|
|
|
import Bent from "@freesewing/bent";
|
|
|
|
import config from "../config";
|
|
|
|
// Parts
|
|
|
|
import draftBackBase from "./backbase";
|
|
|
|
import draftFrontBase from "./frontbase";
|
|
|
|
import draftFront from "./front";
|
|
|
|
import draftBack from "./back";
|
|
|
|
import draftSide from "./side";
|
2019-03-30 20:18:20 +01:00
|
|
|
import draftCollarStand from "./collarstand";
|
2019-03-16 11:39:06 +01:00
|
|
|
import draftCollar from "./collar";
|
2019-03-31 13:19:45 +02:00
|
|
|
import draftUnderCollar from "./undercollar";
|
2019-03-16 11:39:06 +01:00
|
|
|
import draftPocket from "./pocket";
|
2019-03-16 18:24:14 +01:00
|
|
|
import draftPocketLining from "./pocketlining";
|
2019-03-16 11:39:06 +01:00
|
|
|
import draftChestPocketWelt from "./chestpocketwelt";
|
|
|
|
import draftChestPocketBag from "./chestpocketbag";
|
|
|
|
import draftInnerPocketWelt from "./innerpocketwelt";
|
|
|
|
import draftInnerPocketBag from "./innerpocketbag";
|
|
|
|
import draftTopSleeve from "./topsleeve";
|
|
|
|
import draftUnderSleeve from "./undersleeve";
|
|
|
|
|
|
|
|
// Create new design
|
2019-05-02 14:33:34 +02:00
|
|
|
const Pattern = new freesewing.Design(config, [plugins, buttons]);
|
2019-03-16 11:39:06 +01:00
|
|
|
|
|
|
|
// Attach draft methods from Bent to prototype
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBentBase = function(part) {
|
2019-03-16 11:39:06 +01:00
|
|
|
return new Bent(this.settings).draftBase(part);
|
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBentFront = function(part) {
|
2019-03-16 11:39:06 +01:00
|
|
|
return new Bent(this.settings).draftFront(part);
|
2019-04-29 09:01:51 +02:00
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBentBack = function(part) {
|
2019-03-16 11:39:06 +01:00
|
|
|
return new Bent(this.settings).draftBack(part);
|
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBentSleeve = function(part) {
|
2019-03-16 11:39:06 +01:00
|
|
|
return new Bent(this.settings).draftSleeve(part);
|
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBentTopSleeve = function(part) {
|
2019-03-16 11:39:06 +01:00
|
|
|
return new Bent(this.settings).draftTopSleeve(part);
|
|
|
|
};
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBentUnderSleeve = function(part) {
|
2019-03-16 11:39:06 +01:00
|
|
|
return new Bent(this.settings).draftUnderSleeve(part);
|
|
|
|
};
|
|
|
|
|
|
|
|
// Attach own draft methods to prototype
|
2019-05-02 14:33:34 +02:00
|
|
|
Pattern.prototype.draftBackBase = draftBackBase;
|
|
|
|
Pattern.prototype.draftFrontBase = draftFrontBase;
|
|
|
|
Pattern.prototype.draftFront = draftFront;
|
|
|
|
Pattern.prototype.draftBack = draftBack;
|
|
|
|
Pattern.prototype.draftSide = draftSide;
|
|
|
|
Pattern.prototype.draftCollarStand = draftCollarStand;
|
|
|
|
Pattern.prototype.draftCollar = draftCollar;
|
|
|
|
Pattern.prototype.draftUnderCollar = draftUnderCollar;
|
|
|
|
Pattern.prototype.draftPocket = draftPocket;
|
|
|
|
Pattern.prototype.draftPocketLining = draftPocketLining;
|
|
|
|
Pattern.prototype.draftChestPocketWelt = draftChestPocketWelt;
|
|
|
|
Pattern.prototype.draftChestPocketBag = draftChestPocketBag;
|
|
|
|
Pattern.prototype.draftInnerPocketWelt = draftInnerPocketWelt;
|
|
|
|
Pattern.prototype.draftInnerPocketBag = draftInnerPocketBag;
|
|
|
|
Pattern.prototype.draftTopSleeve = draftTopSleeve;
|
|
|
|
Pattern.prototype.draftUnderSleeve = draftUnderSleeve;
|
2019-03-16 11:39:06 +01:00
|
|
|
|
2019-05-02 14:33:34 +02:00
|
|
|
export default Pattern;
|