From 3864ff14261506b9875ea7e19d30d378b304b146 Mon Sep 17 00:00:00 2001 From: wout Date: Fri, 5 Apr 2013 10:58:01 +0100 Subject: Stored base offset as a private variable --- src/text.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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() }) -- cgit v1.2.3