summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-04-05 10:58:01 +0100
committerwout <wout@impinc.co.uk>2013-04-05 10:58:01 +0100
commit3864ff14261506b9875ea7e19d30d378b304b146 (patch)
tree3ac6459dc25e4419e5053d2fa5e74e84ddfcd31e /src
parentc2e26791aaca5356ca9dea7a6874aa23795b787e (diff)
downloadsvg.js-3864ff14261506b9875ea7e19d30d378b304b146.tar.gz
svg.js-3864ff14261506b9875ea7e19d30d378b304b146.zip
Stored base offset as a private variable
Diffstat (limited to 'src')
-rw-r--r--src/text.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/text.js b/src/text.js
index b3765e6..5673a3b 100644
--- a/src/text.js
+++ b/src/text.js
@@ -13,6 +13,7 @@ SVG.Text = function() {
}
this._leading = 1.2
+ this._base = 0.276666666
}
// Inherit from SVG.Element
@@ -102,7 +103,7 @@ SVG.extend(SVG.Text, {
/* define position of all lines */
for (i = 0, il = this.lines.length; i < il; i++)
this.lines[i].attr({
- dy: size * this._leading - (i == 0 ? size * 0.276666666 : 0)
+ dy: size * this._leading - (i == 0 ? size * this._base : 0)
, x: (this.attr('x') || 0)
, style: this.style()
})