aboutsummaryrefslogtreecommitdiffstats
path: root/playgrounds/transforms
diff options
context:
space:
mode:
Diffstat (limited to 'playgrounds/transforms')
-rw-r--r--playgrounds/transforms/transforms.html27
-rw-r--r--playgrounds/transforms/transforms.js7
2 files changed, 34 insertions, 0 deletions
diff --git a/playgrounds/transforms/transforms.html b/playgrounds/transforms/transforms.html
new file mode 100644
index 0000000..4382745
--- /dev/null
+++ b/playgrounds/transforms/transforms.html
@@ -0,0 +1,27 @@
+
+<!DOCTYPE html>
+<html>
+
+ <head>
+ <meta charset="utf-8">
+ <title>SVG Playground</title>
+ <link rel="stylesheet" href="../playground.css">
+ </head>
+
+ <body>
+
+ <h1>SVG JS Playground</h1>
+
+ <svg viewBox="0 0 1000 1000">
+
+ <rect id="old" x=300 y=400 width=200 height=400 class="green"/>
+ <rect id="new" x=300 y=400 width=200 height=400 class="pink"/>
+
+ </svg>
+
+ </body>
+
+ <script src="../../dist/svg.js" charset="utf-8"></script>
+ <script src="transforms.js" charset="utf-8"></script>
+
+</html>
diff --git a/playgrounds/transforms/transforms.js b/playgrounds/transforms/transforms.js
new file mode 100644
index 0000000..797fa65
--- /dev/null
+++ b/playgrounds/transforms/transforms.js
@@ -0,0 +1,7 @@
+
+let mover = SVG.select("#new")[0]
+
+console.log(mover.transform());
+mover.transform({
+ position: [30, 50]
+})