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) --- spec/spec/text.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec') diff --git a/spec/spec/text.js b/spec/spec/text.js index 83b1596..84a12c2 100644 --- a/spec/spec/text.js +++ b/spec/spec/text.js @@ -79,6 +79,11 @@ describe('Text', function() { var box = text.bbox() expect(box.y).toBe(345) }) + it('sets the value of y with SVG.Number as first argument', function() { + text.y(new SVG.Number(345)) + var box = text.bbox() + expect(box.y).toBe(345) + }) it('sets the value of y with a percent value', function() { text.y('40%') expect(text.node.getAttribute('y')).toBe('40%') -- cgit v1.2.3