🚧 Working on hooks
This commit is contained in:
parent
cff2a4023d
commit
eda19195d1
5 changed files with 51 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue