2018-07-26 10:03:19 +00:00
|
|
|
import freesewing from "freesewing";
|
|
|
|
import cutonfold from "@freesewing/plugin-cutonfold";
|
2018-07-26 12:38:46 +00:00
|
|
|
import title from "@freesewing/plugin-title";
|
|
|
|
import logo from "@freesewing/plugin-logo";
|
2018-07-26 10:03:19 +00:00
|
|
|
import config from "../config/config";
|
2018-07-24 10:16:31 +00:00
|
|
|
import back from "./back";
|
|
|
|
import { version } from "../package.json";
|
2018-07-26 12:38:46 +00:00
|
|
|
console.log("logo is", logo);
|
2018-07-26 10:03:19 +00:00
|
|
|
var pattern = new freesewing.pattern({ version: version, ...config })
|
|
|
|
.with(cutonfold)
|
2018-07-26 12:38:46 +00:00
|
|
|
.with(title)
|
|
|
|
.with(logo);
|
2018-07-26 10:03:19 +00:00
|
|
|
//pattern.on("preRenderSvg", function(next) {
|
|
|
|
// this.attributes.add(`freesewing:${name}`, version);
|
|
|
|
// next();
|
|
|
|
//});
|
2018-07-15 18:57:27 +02:00
|
|
|
|
2018-07-26 10:03:19 +00:00
|
|
|
pattern.draft = function() {
|
|
|
|
back.draft(pattern.parts.back);
|
2018-07-24 14:37:32 +00:00
|
|
|
|
2018-07-26 10:03:19 +00:00
|
|
|
return pattern;
|
2018-07-24 10:16:31 +00:00
|
|
|
};
|
2018-07-15 18:57:27 +02:00
|
|
|
|
2018-07-26 12:38:46 +00:00
|
|
|
module.exports = pattern;
|