diff options
author | wout <wout@impinc.co.uk> | 2014-02-03 21:44:34 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-02-03 21:44:34 +0100 |
commit | 8dcb37d3406a85ef639e31b256823cf24fd7b7c6 (patch) | |
tree | 3c926ea927e63c7b4e4eb1dbd5befd9f06fa8e54 /src | |
parent | 78bbbfebcf6a2b2e17e46f395cf665c932957f36 (diff) | |
download | svg.js-8dcb37d3406a85ef639e31b256823cf24fd7b7c6.tar.gz svg.js-8dcb37d3406a85ef639e31b256823cf24fd7b7c6.zip |
Added `length()`method to path
Diffstat (limited to 'src')
-rwxr-xr-x | src/path.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/path.js b/src/path.js index 4ce57f6..76ef1ba 100755 --- a/src/path.js +++ b/src/path.js @@ -37,6 +37,10 @@ SVG.Path = SVG.invent({ , height: function(height) { return height == null ? this.bbox().height : this.size(this.bbox().width, height) } + // Get path length + , length: function() { + return this.node.getTotalLength() + } } // Add parent method |