Embedding a template for SVG element instead of just styles

This commit is contained in:
Jeff Avallone
2014-12-26 15:38:22 -05:00
parent 2007fd9e01
commit b292a764ff
6 changed files with 19 additions and 33 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ export default class Regexper {
this.download = root.querySelector('a[data-glyph="data-transfer-download"]');
this.percentage = root.querySelector('#progress div');
this.svgContainer = root.querySelector('#regexp-render');
this.svgStyles = this.root.querySelector('#svg-styles').innerHTML;
this.svgBase = this.root.querySelector('#svg-base').innerHTML;
this.gaq = (typeof window._gaq === 'undefined') ? [] : window._gaq;
}
@@ -158,7 +158,7 @@ export default class Regexper {
throw message;
})
.invoke('render', this.svgContainer, this.svgStyles)
.invoke('render', this.svgContainer, this.svgBase)
.then(() => {
this.state = 'has-results';
this.updateLinks();