summaryrefslogtreecommitdiffstats
path: root/dist/svg.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-26 12:33:14 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-26 12:33:14 +0200
commit4c297f56dec369b270a7b692a2fbe661d303802a (patch)
treebcf843bdc51e32dd0a0094df0ab120c47dd1a3d1 /dist/svg.js
parent5520d76e4332c1a782899679ffa8cca2285a70ce (diff)
downloadsvg.js-4c297f56dec369b270a7b692a2fbe661d303802a.tar.gz
svg.js-4c297f56dec369b270a7b692a2fbe661d303802a.zip
fixes and addition in SVG.PointArray (#805)
- fixed SVG.PointArray having a reference to outside array in some cases - added possibility to pass an array of point objects to SVG.PointArray
Diffstat (limited to 'dist/svg.js')
-rw-r--r--dist/svg.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/dist/svg.js b/dist/svg.js
index 579c738..27e38d4 100644
--- a/dist/svg.js
+++ b/dist/svg.js
@@ -6,7 +6,7 @@
* @copyright Wout Fierens <wout@mick-wout.com>
* @license MIT
*
-* BUILT: Sat May 26 2018 11:44:24 GMT+0200 (Mitteleuropäische Sommerzeit)
+* BUILT: Sat May 26 2018 12:31:51 GMT+0200 (Mitteleuropäische Sommerzeit)
*/;
(function(root, factory) {
/* istanbul ignore next */
@@ -556,7 +556,11 @@ SVG.extend(SVG.PointArray, {
if (Array.isArray(array)) {
// and it is not flat, there is no need to parse it
if(Array.isArray(array[0])) {
- return array
+ // make sure to use a clone
+ return array.map(function (el) { return el.slice() })
+ } else if (array[0].x != null){
+ // allow point objects to be passed
+ return array.map(function (el) { return [el.x, el.y] })
}
} else { // Else, it is considered as a string
// parse points