From 8dcb37d3406a85ef639e31b256823cf24fd7b7c6 Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 3 Feb 2014 21:44:34 +0100 Subject: Added `length()`method to path --- dist/svg.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dist/svg.js') diff --git a/dist/svg.js b/dist/svg.js index 4a4f9db..0ae4acd 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -1,4 +1,4 @@ -/* svg.js v1.0rc3 - svg inventor regex default color array pointarray patharray number viewbox bbox rbox element parent container fx relative event defs group arrange mask clip gradient doc shape use rect ellipse line poly path image text textpath nested hyperlink sugar set data memory loader - svgjs.com/license */ +/* svg.js v1.0rc3-2-g78bbbfe - svg inventor regex default color array pointarray patharray number viewbox bbox rbox element parent container fx relative event defs group arrange mask clip gradient doc shape use rect ellipse line poly path image text textpath nested hyperlink sugar set data memory loader - svgjs.com/license */ ;(function() { this.SVG = function(element) { @@ -2910,6 +2910,10 @@ , 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 -- cgit v1.2.3