aboutsummaryrefslogtreecommitdiffstats
path: root/src/elements/G.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-06 13:48:05 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-06 13:48:05 +0100
commita0b13ebcacfd74b9f521110c7225bb404325bcd3 (patch)
treea07c5cc422645e31d7dfef81ce4e54f03f0945f6 /src/elements/G.js
parent9f2696e8a2cf7e4eebc1cc7e31027fe2070094fa (diff)
downloadsvg.js-a0b13ebcacfd74b9f521110c7225bb404325bcd3.tar.gz
svg.js-a0b13ebcacfd74b9f521110c7225bb404325bcd3.zip
reordered modules, add es6 build
Diffstat (limited to 'src/elements/G.js')
-rw-r--r--src/elements/G.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/elements/G.js b/src/elements/G.js
new file mode 100644
index 0000000..00803c0
--- /dev/null
+++ b/src/elements/G.js
@@ -0,0 +1,20 @@
+import { nodeOrNew, register } from '../utils/adopter.js'
+import { registerMethods } from '../utils/methods.js'
+import Container from './Container.js'
+
+export default class G extends Container {
+ constructor (node) {
+ super(nodeOrNew('g', node), G)
+ }
+}
+
+registerMethods({
+ Element: {
+ // Create a group element
+ group: function () {
+ return this.put(new G())
+ }
+ }
+})
+
+register(G)