From f0dc4d5ee03add261242743aa583c19d918f317c Mon Sep 17 00:00:00 2001 From: wout Date: Fri, 1 Aug 2014 20:40:49 +0200 Subject: Added SVG.Bare for creation of non-described elements --- src/element.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/element.js') diff --git a/src/element.js b/src/element.js index b319e00..8db2359 100755 --- a/src/element.js +++ b/src/element.js @@ -2,15 +2,15 @@ SVG.Element = SVG.invent({ // Initialize node create: function(node) { - // Make stroke value accessible dynamically + // make stroke value accessible dynamically this._stroke = SVG.defaults.attrs.stroke - // Create circular reference + // create circular reference if (this.node = node) { this.type = node.nodeName this.node.instance = this - // Store current attribute value + // store current attribute value this._stroke = node.getAttribute('stroke') || this._stroke } } @@ -185,7 +185,7 @@ SVG.Element = SVG.invent({ // act as a setter if svg is given if (svg && this instanceof SVG.Parent) { // dump raw svg - well.innerHTML = '' + svg + '' + well.innerHTML = '' + svg.replace(/\n/, '').replace(/<(\w+)([^<]+?)\/>/g, '<$1$2>') + '' // transplant nodes for (var i = 0, il = well.firstChild.childNodes.length; i < il; i++) -- cgit v1.2.3