animate-svg
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -17,4 +17,4 @@ "use strict"; | ||
return new Promise(function (resolve, reject) { | ||
path.addEventListener('transitionend', function (e) { | ||
path.removeEventListener('transitionend', resolve); | ||
path.addEventListener('transitionend', function handler(e) { | ||
path.removeEventListener('transitionend', handler); | ||
resolve(e); | ||
@@ -31,4 +31,4 @@ }); | ||
var style = path.style; | ||
style.transition = null; | ||
style.opacity = null; | ||
style.transition = ''; | ||
style.opacity = ''; | ||
style.strokeDasharray = length + " " + length; | ||
@@ -35,0 +35,0 @@ style.strokeDashoffset = initialOffset.toString(); |
{ | ||
"name": "animate-svg", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Animate SVG paths & lines", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,4 +18,4 @@ export type SVGGeometryElement = SVGPathElement | SVGLineElement | ||
return new Promise<Event>((resolve, reject) => { | ||
path.addEventListener('transitionend', e => { | ||
path.removeEventListener('transitionend', resolve) | ||
path.addEventListener('transitionend', function handler(e) { | ||
path.removeEventListener('transitionend', handler) | ||
resolve(e) | ||
@@ -34,4 +34,4 @@ }) | ||
const { style } = path | ||
style.transition = null | ||
style.opacity = null | ||
style.transition = '' | ||
style.opacity = '' | ||
style.strokeDasharray = `${length} ${length}` | ||
@@ -38,0 +38,0 @@ style.strokeDashoffset = initialOffset.toString() |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7308