summaryrefslogtreecommitdiffstats
path: root/src/text.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-29 15:20:50 +0100
committerwout <wout@impinc.co.uk>2012-12-29 15:20:50 +0100
commit331068a979be8b735e92f074ce0d2438f5f2127b (patch)
tree25983c08fc3c28ab7bdf5c394a4800b3b095d092 /src/text.js
parenta20c0b1430fb97ff203a9afd6ba6945cf18e58d1 (diff)
downloadsvg.js-331068a979be8b735e92f074ce0d2438f5f2127b.tar.gz
svg.js-331068a979be8b735e92f074ce0d2438f5f2127b.zip
Added polyline and polygon, removed cicle
Diffstat (limited to 'src/text.js')
-rw-r--r--src/text.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/text.js b/src/text.js
index 7528c27..301373c 100644
--- a/src/text.js
+++ b/src/text.js
@@ -20,7 +20,8 @@ SVG.extend(SVG.Text, {
var i, n,
s = this._style(),
p = this.parentDoc(),
- a = t.split("\n");
+ a = t.split("\n"),
+ f = this.style['font-size'];
while (this.node.hasChildNodes())
this.node.removeChild(this.node.lastChild);
@@ -29,7 +30,7 @@ SVG.extend(SVG.Text, {
n = new TSpan().
text(a[i]).
attr({
- dy: this.style['font-size'] * this.leading,
+ dy: f * this.leading - (i == 0 ? f * 0.3 : 0),
x: (this.attr('x') || 0),
style: s
});