animate-svg
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -20,5 +20,3 @@ "use strict"; | ||
var getLength = function (path) { | ||
return typeof path.getTotalLength === 'function' | ||
? path.getTotalLength() | ||
: getLineLength(path); | ||
return typeof path.getTotalLength === 'function' ? path.getTotalLength() : getLineLength(path); | ||
}; | ||
@@ -25,0 +23,0 @@ exports.default = function (path, speed, reverse) { |
{ | ||
"name": "animate-svg", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Animate SVG paths & lines", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,6 +25,4 @@ export type SVGGeometryElement = SVGPathElement | SVGLineElement | ||
const getLength = (path: SVGGeometryElement) => | ||
typeof path.getTotalLength === 'function' | ||
? (path as SVGPathElement).getTotalLength() | ||
: getLineLength(path as SVGLineElement) | ||
const getLength = (path: SVGGeometryElement): number => | ||
typeof path.getTotalLength === 'function' ? path.getTotalLength() : getLineLength(path as SVGLineElement) | ||
@@ -31,0 +29,0 @@ export default (path: SVGGeometryElement, speed: number, reverse = false) => { |
Sorry, the diff of this file is not supported yet
8191
105