summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-26 21:17:52 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-26 21:17:52 +0200
commit91785e4c1921c3f8a0aa2c799b214245bb8755f4 (patch)
tree655a825c6afc3490b098d613bdeedf87d82df66b /spec
parent7990dc47fda4f3b850c18318775ab108c2aff8f5 (diff)
downloadsvg.js-91785e4c1921c3f8a0aa2c799b214245bb8755f4.tar.gz
svg.js-91785e4c1921c3f8a0aa2c799b214245bb8755f4.zip
fixed `SVG.Text.y()` which didnt work correctly with `SVG.Number` (#778)
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/text.js5
1 files changed, 5 insertions, 0 deletions
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%')