From 91785e4c1921c3f8a0aa2c799b214245bb8755f4 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Sat, 26 May 2018 21:17:52 +0200 Subject: fixed `SVG.Text.y()` which didnt work correctly with `SVG.Number` (#778) --- src/text.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/text.js b/src/text.js index 20c2c1e..9895a35 100644 --- a/src/text.js +++ b/src/text.js @@ -33,7 +33,7 @@ SVG.Text = SVG.invent({ if (y == null) return typeof oy === 'number' ? oy - o : oy - return this.attr('y', typeof y === 'number' ? y + o : y) + return this.attr('y', typeof y.valueOf() === 'number' ? y + o : y) } // Move center over x-axis , cx: function(x) { -- cgit v1.2.3