aboutsummaryrefslogtreecommitdiffstats
path: root/dirty.html
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-07-04 18:27:00 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-07-04 18:27:00 +0200
commitee25f92f87f2fc5bb6ab65023c4515a285535ff4 (patch)
tree5dfe354df5753779ba5be0dd74b4feaf507c4a7c /dirty.html
parentac854317c3ef89ca2c25b6293530babf1cd9b28c (diff)
downloadsvg.js-ee25f92f87f2fc5bb6ab65023c4515a285535ff4.tar.gz
svg.js-ee25f92f87f2fc5bb6ab65023c4515a285535ff4.zip
make TransformBag clone the object before altering
Diffstat (limited to 'dirty.html')
-rw-r--r--dirty.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/dirty.html b/dirty.html
index 896449b..df7c871 100644
--- a/dirty.html
+++ b/dirty.html
@@ -275,12 +275,15 @@ let obj = { rotate: 180, origin: 'center', translate: [300, 0] }
let obj2 = { rotate: 360, origin: 'center' }
a.clone() // startPosition
-a.clone().transform(obj, true).transform(obj2, true) // endPosition
+//a.clone().transform(obj, true).transform(obj2, true) // endPosition
// that works
a.animate(new SVG.Spring(50, 30)).transform(obj) // animation
// that breaks (why??)
-// a.clone().animate(new SVG.Spring(50, 30)).transform(obj) // animation
+
+var b = a.clone().animate(new SVG.Spring(500, 30))
+//debugger
+b.transform(obj) // animation
//a.animate(300).transform(obj, true).transform(obj2, true) // animation