Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Allow numeric values with leading '+' and/or with exponent parts. Fixes #551

Ari Lotter091cb4249b59
diff --git a/src/index.js b/src/index.js
index 7caf091c..a661b543 100644
--- a/src/index.js
+++ b/src/index.js
@@ -625,7 +625,7 @@ function getPathProgress(path, progress) {
// Decompose value
function decomposeValue(val, unit) {
- const rgx = /-?\d*\.?\d+/g;
+ const rgx = /[-+]?\d*\.?\d+([eE][-+]?\d+)?/g;
const value = validateValue((is.pth(val) ? val.totalLength : val), unit) + '';
return {
original: value,