diff options
author | wout <wout@impinc.co.uk> | 2013-04-05 10:58:01 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-04-05 10:58:01 +0100 |
commit | 3864ff14261506b9875ea7e19d30d378b304b146 (patch) | |
tree | 3ac6459dc25e4419e5053d2fa5e74e84ddfcd31e /src | |
parent | c2e26791aaca5356ca9dea7a6874aa23795b787e (diff) | |
download | svg.js-3864ff14261506b9875ea7e19d30d378b304b146.tar.gz svg.js-3864ff14261506b9875ea7e19d30d378b304b146.zip |
Stored base offset as a private variable
Diffstat (limited to 'src')
-rw-r--r-- | src/text.js | 3 |
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() }) |