diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-06-03 08:17:15 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-06-03 08:17:15 +0200 |
commit | 1e25302f6f61836c0fdb9bab01650b967c1fe8ab (patch) | |
tree | f88d442c7b877874bc4e4ba8bffebff3f9f85993 /dirty.html | |
parent | 977554fea55eaf42ed09757529bc2566c003e755 (diff) | |
download | svg.js-1e25302f6f61836c0fdb9bab01650b967c1fe8ab.tar.gz svg.js-1e25302f6f61836c0fdb9bab01650b967c1fe8ab.zip |
transforms work with multiple elements too. Satisfy linter
Diffstat (limited to 'dirty.html')
-rw-r--r-- | dirty.html | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -199,13 +199,18 @@ function getColor(t) { var timer = 0 -let recy = SVG('<rect>').addTo('svg').size(100, 100)//.transform({translateX: -50, translateY: -50}) -recy.timeline().source(() => { +let rec1 = SVG('<rect>').addTo('svg').size(100, 100)//.transform({translateX: -50, translateY: -50}) +let rec2 = SVG('<rect>').addTo('svg').size(100, 100)//.transform({translateX: -50, translateY: -50}) +rec1.timeline().source(() => { + timer += 5 + return timer +}) +rec2.timeline().source(() => { timer += 5 return timer }) -var runner = recy +var runner = rec1 // .animate(100).attr('fill', '#fff') //.animate().transform({rotate: -45, origin: [50, 50]}) .animate(500) @@ -221,6 +226,17 @@ var runner = recy // .transform({scale: 2}, true) // .animate(2000, 0, 'absolute') // .transform({rotate: -300}) +var runner = rec2 + // .animate(100).attr('fill', '#fff') + .animate().transform({rotate: -45, origin: [50, 50]}) + .transform({scale:2}, true) + // .transform({rotate: 360}, true) + // .transform({translateX: 50, translateY: 50}, true) + //.transform({translateX: 50, translateY: 50}, true) + // .animate(500, 0, 'absolute') + // .transform({scale: 2}, true) + // .animate(2000, 0, 'absolute') + // .transform({rotate: -300}) // transform(SVG.Matrix()) // should be affine // transform(SVG.Matrix(), true) // should be relative |