1
0
Fork 0

🚧 Working on hooks

This commit is contained in:
Joost De Cock 2018-08-07 13:46:38 +02:00
parent cff2a4023d
commit eda19195d1
5 changed files with 51 additions and 12 deletions

View file

@ -54,6 +54,7 @@ export default function Pattern(config = false) {
};
this.Part.prototype.context = this.context;
this.Part.prototype.macros = {};
this.Part.prototype.hooks = this.hooks;
}
/**
@ -66,9 +67,9 @@ Pattern.prototype.draft = function() {
};
Pattern.prototype.render = function() {
this.hooks.attach("preRenderSvg", this.svg);
//this.hooks.attach("preRenderSvg", this.svg);
this.hooks.attach("postRenderSvg", this.svg);
//this.hooks.attach("postRenderSvg", this.svg);
//this.hooks.attach('insertText', this.svg);
return this.pack().svg.render(this);