aboutsummaryrefslogtreecommitdiffstats
path: root/playgrounds/transforms/transforms.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2023-06-13 01:43:37 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2023-06-13 01:43:37 +0200
commit03322672782a6318b019eff33fe44ec800d6f12c (patch)
tree9d807e1585cf28a1ea98e87b855932dba00f1880 /playgrounds/transforms/transforms.js
parent8e18b4698edd00f83af0be05bb3374f92fecaeb9 (diff)
downloadsvg.js-03322672782a6318b019eff33fe44ec800d6f12c.tar.gz
svg.js-03322672782a6318b019eff33fe44ec800d6f12c.zip
dependency updates, easier formatting
Diffstat (limited to 'playgrounds/transforms/transforms.js')
-rw-r--r--playgrounds/transforms/transforms.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/playgrounds/transforms/transforms.js b/playgrounds/transforms/transforms.js
index e9c0376..d750797 100644
--- a/playgrounds/transforms/transforms.js
+++ b/playgrounds/transforms/transforms.js
@@ -1,22 +1,21 @@
-
-
let canvas = SVG('#canvas')
// Make the green rectangle
-canvas.rect(200, 400).move(200, 400)
- .attr('opacity', 0.3)
- .addClass('green')
+canvas.rect(200, 400).move(200, 400).attr('opacity', 0.3).addClass('green')
// Make the pink rectangle
-let a = canvas.rect(200, 400).move(200, 400)
+let a = canvas
+ .rect(200, 400)
+ .move(200, 400)
.attr('opacity', 0.3)
.addClass('pink')
.transform({ px: 100, py: 500, origin: 'top-left' })
- a.animate()
- .rotate({ rotate: 500, origin: 'top-right' })
+a.animate().rotate({ rotate: 500, origin: 'top-right' })
// Put an ellipse where we expect the object to be
-canvas.ellipse(30, 30).center(100, 500)
+canvas
+ .ellipse(30, 30)
+ .center(100, 500)
.attr('opacity', 0.3)
.addClass('dark-pink')