diff options
Diffstat (limited to 'src/element.js')
-rw-r--r-- | src/element.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/element.js b/src/element.js index 981f9a0..5664f46 100644 --- a/src/element.js +++ b/src/element.js @@ -50,15 +50,6 @@ SVG.extend(SVG.Element, { else return this.attrs[a]; - } else if (this._isStyle(a)) { - a == 'text' ? - this.text(v) : - a == 'leading' ? - this[a] = v : - this.style[a] = v; - - this.text(this.content); - } else { this.attrs[a] = v; if (a == 'x' && this._isText()) @@ -68,7 +59,16 @@ SVG.extend(SVG.Element, { n != null ? this.node.setAttributeNS(n, a, v) : this.node.setAttribute(a, v); - + + if (this._isStyle(a)) { + a == 'text' ? + this.text(v) : + a == 'leading' ? + this[a] = v : + this.style[a] = v; + + this.text(this.content); + } } return this; |