summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-02-05 10:51:47 +0100
committerwout <wout@impinc.co.uk>2014-02-05 10:51:47 +0100
commit050af98a7ada3280f02acf25fbaba585a264e68a (patch)
treeb03c435ba69363b85e3e865723ea71757d489d37 /spec
parentc51d352babb75ef56fc71d93056a797d7f1d70c5 (diff)
downloadsvg.js-050af98a7ada3280f02acf25fbaba585a264e68a.tar.gz
svg.js-050af98a7ada3280f02acf25fbaba585a264e68a.zip
added pointAt() method to SVG.Path
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/path.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/spec/path.js b/spec/spec/path.js
index 38ec932..85d596e 100644
--- a/spec/spec/path.js
+++ b/spec/spec/path.js
@@ -159,6 +159,19 @@ describe('Path', function() {
expect(path.node.getAttribute('d')).toBe('M 50 60 A 60 60 0 0 0 50 -60 H 100 V 100 L 20 30 C 10 20 30 40 50 60')
})
})
+
+ describe('length()', function() {
+ it('gets the total length of the path', function() {
+ expect(path.length()).toBe(path.node.getTotalLength())
+ })
+ })
+
+ describe('pointAt()', function() {
+ it('gets a point at given length', function() {
+ expect(path.pointAt(100)).toEqual(path.node.getPointAtLength(100))
+ })
+ })
+
})