diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-03-14 18:43:22 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-03-14 18:43:22 +0100 |
commit | af45360b7b2a8dc3f3eaed553f9544b4318e7348 (patch) | |
tree | 8da54a60d1c23854239996bc5318ccb87e8f1b15 /src/helpers.js | |
parent | 4b6e28689412a3fda9a52f2e665dbc536c87cd8f (diff) | |
download | svg.js-af45360b7b2a8dc3f3eaed553f9544b4318e7348.tar.gz svg.js-af45360b7b2a8dc3f3eaed553f9544b4318e7348.zip |
move most regexe to SVG.regex, fix matrix constructor for string argument
Diffstat (limited to 'src/helpers.js')
-rw-r--r-- | src/helpers.js | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/helpers.js b/src/helpers.js index 4974517..e3ad6f0 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -95,22 +95,6 @@ function ensureCentre(o, target) { o.cy = o.cy == null ? target.bbox().cy : o.cy } -// Convert string to matrix -function stringToMatrix(source) { - // remove matrix wrapper and split to individual numbers - source = source - .replace(SVG.regex.whitespace, '') - .replace(SVG.regex.matrix, '') - .split(SVG.regex.matrixElements) - - // convert string values to floats and convert to a matrix-formatted object - return arrayToMatrix( - SVG.utils.map(source, function(n) { - return parseFloat(n) - }) - ) -} - // PathArray Helpers function arrayToString(a) { for (var i = 0, il = a.length, s = ''; i < il; i++) { |